jakarta-jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r581701 - /jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java
Date Wed, 03 Oct 2007 19:25:14 GMT
Author: sebb
Date: Wed Oct  3 12:25:13 2007
New Revision: 581701

URL: http://svn.apache.org/viewvc?rev=581701&view=rev
Log:
Oops - missed out one of the required constructors

Modified:
    jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java

Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java?rev=581701&r1=581700&r2=581701&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java Wed Oct  3 12:25:13
2007
@@ -137,6 +137,19 @@
 	}
 
 	/**
+	 * Create a functor with the class, method name, and argument class types.
+	 *
+     * Subsequent invoke() calls must provide the appropriate ivokee object.
+     *
+	 * @param _clazz the class in which to find the method
+	 * @param _methodName method name
+	 * @param types
+	 */
+	public Functor(Class _clazz, String _methodName, Class[] types) {
+		this(_clazz, null, _methodName, null, types);
+	}
+
+	/**
 	 * Create a functor with just the method name.
 	 * 
 	 * The invokee and any parameters must be provided in all invoke() calls.
@@ -232,6 +245,7 @@
 		try {
 			Method method = doCreateMethod(_class , argTypes);
 			if (method == null){
+				log.error("Can't find method "+_class+typesToString(argTypes));
 				throw new JMeterError("Can't find method "+_class+typesToString(argTypes));
 			}
 			return method.invoke(_invokee, _args);
@@ -330,9 +344,11 @@
 						}
 					}
 					Class parent = p_types[i].getSuperclass();
-					methodToInvoke = doCreateMethod(p_class,getNewArray(i, parent, p_types));
-					if (methodToInvoke != null) {
-						return methodToInvoke;
+					if (parent != null) {
+						methodToInvoke = doCreateMethod(p_class,getNewArray(i, parent, p_types));
+						if (methodToInvoke != null) {
+							return methodToInvoke;
+						}
 					}
 				}
 			}



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Mime
View raw message