adammurdoch 02/03/20 22:33:17
Modified:
proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
DefaultObjectConfigurer.java
Log:
Configurer now ignore methods that take an array type as their parameter.
Revision Changes Path
1.19 +8 -7
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
Index: DefaultObjectConfigurer.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- DefaultObjectConfigurer.java 19 Mar 2002 11:19:23 -0000 1.18
+++ DefaultObjectConfigurer.java 21 Mar 2002 06:33:17 -0000 1.19
@@ -10,11 +10,11 @@
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Collection;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -24,7 +24,7 @@
* of a class.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a>
- * @version $Revision: 1.18 $ $Date: 2002/03/19 11:19:23 $
+ * @version $Revision: 1.19 $ $Date: 2002/03/21 06:33:17 $
*/
class DefaultObjectConfigurer
implements ObjectConfigurer
@@ -197,10 +197,10 @@
/**
* Locate all methods whose name starts with a particular
* prefix, and which are non-static, return void, and take a single
- * parameter. If there are more than one matching methods of a given
- * name, the method that takes a String parameter (if any) is ignored.
- * If after that there are more than one matching methods of a given
- * name, an exception is thrown.
+ * non-array parameter. If there are more than one matching methods of
+ * a given name, the method that takes a String parameter (if any) is
+ * ignored. If after that there are more than one matching methods of
+ * a given name, an exception is thrown.
*
* @return Map from property name -> Method object for that property.
*/
@@ -217,7 +217,8 @@
final Method method = (Method)iterator.next();
final String methodName = method.getName();
if( Void.TYPE != method.getReturnType() ||
- 1 != method.getParameterTypes().length )
+ 1 != method.getParameterTypes().length ||
+ method.getParameterTypes()[ 0 ].isArray() )
{
continue;
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>