donaldp 2002/06/24 17:20:15
Modified: container/src/java/org/apache/myrmidon/components/configurer
ObjectConfigurer.java PropertyConfigurer.java
Log:
Remove indexing and counting from components.
No longer used anymore due to architecture change.
Revision Changes Path
1.11 +5 -18
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/ObjectConfigurer.java
Index: ObjectConfigurer.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/ObjectConfigurer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ObjectConfigurer.java 23 Jun 2002 08:52:25 -0000 1.10
+++ ObjectConfigurer.java 25 Jun 2002 00:20:15 -0000 1.11
@@ -99,10 +99,7 @@
final String propName = extractName( 3, method.getName() );
final PropertyConfigurer setter =
- new PropertyConfigurer( getPropertyCount(),
- type,
- method,
- 1 );
+ new PropertyConfigurer( type, method );
m_setters.put( propName, setter );
}
}
@@ -132,10 +129,7 @@
final String propName = extractName( 3, methodName );
final PropertyConfigurer configurer =
- new PropertyConfigurer( getPropertyCount(),
- type,
- method,
- Integer.MAX_VALUE );
+ new PropertyConfigurer( type, method );
m_adders.put( propName, configurer );
}
}
@@ -164,11 +158,7 @@
throw new ModelException( message );
}
- m_typedPropertyConfigurer
- = new PropertyConfigurer( getPropertyCount(),
- type,
- method,
- Integer.MAX_VALUE );
+ m_typedPropertyConfigurer = new PropertyConfigurer( type, method );
}
/**
@@ -187,10 +177,7 @@
final Method method = (Method)methods.iterator().next();
final Class type = method.getParameterTypes()[ 0 ];
- m_contentConfigurer = new PropertyConfigurer( getPropertyCount(),
- type,
- method,
- 1 );
+ m_contentConfigurer = new PropertyConfigurer( type, method );
}
/**
1.8 +11 -21
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/PropertyConfigurer.java
Index: PropertyConfigurer.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/PropertyConfigurer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- PropertyConfigurer.java 23 Jun 2002 08:37:36 -0000 1.7
+++ PropertyConfigurer.java 25 Jun 2002 00:20:15 -0000 1.8
@@ -25,17 +25,20 @@
private static final Resources REZ =
ResourceManager.getPackageResources( PropertyConfigurer.class );
- private final int m_propertyIndex;
private final Class m_type;
private final Method m_method;
- private final int m_maxCount;
- PropertyConfigurer( final int propIndex,
- final Class type,
- final Method method,
- final int maxCount )
+ PropertyConfigurer( final Class type, final Method method )
{
- m_propertyIndex = propIndex;
+ if( null == method )
+ {
+ throw new NullPointerException( "method" );
+ }
+ if( null == type )
+ {
+ throw new NullPointerException( "type" );
+ }
+
if( type.isPrimitive() )
{
m_type = getComplexTypeFor( type );
@@ -45,12 +48,6 @@
m_type = type;
}
m_method = method;
- m_maxCount = maxCount;
-
- if( null == m_method )
- {
- throw new NullPointerException( "method" );
- }
}
/**
@@ -68,13 +65,6 @@
throws ModelException
{
final ConfigurationState defState = (ConfigurationState)state;
- // Check the property count
- if( defState.getPropertyCount( m_propertyIndex ) >= m_maxCount )
- {
- final String message = REZ.getString( "too-many-values.error" );
- throw new ModelException( message );
- }
- defState.incPropertyCount( m_propertyIndex );
try
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>