djencks 2004/09/10 01:16:28
Modified: modules/core/src/java/org/openejb/dispatch MethodHelper.java
Log:
Make primitive types work in cmp method args, also simplifies code
Revision Changes Path
1.3 +4 -11
openejb/modules/core/src/java/org/openejb/dispatch/MethodHelper.java
Index: MethodHelper.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/dispatch/MethodHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MethodHelper.java 21 Mar 2004 21:26:34 -0000 1.2
+++ MethodHelper.java 10 Sep 2004 05:16:27 -0000 1.3
@@ -65,18 +65,11 @@
private MethodHelper() {
}
- public static int getSuperIndex(Class proxyImpl, MethodSignature signature)
throws ClassNotFoundException {
- // convert the signature parameter type String array into a Class array
- String[] parameterTypes = signature.getParameterTypes();
- ClassLoader classLoader = proxyImpl.getClassLoader();
- Class[] params = new Class[parameterTypes.length];
- for (int i = 0; i < parameterTypes.length; i++) {
- params[i] = classLoader.loadClass(parameterTypes[i]);
- }
-
+ public static int getSuperIndex(Class proxyImpl, MethodSignature signature) {
try {
+ //TODO look at asm Type and see if there is a more straightforward way
to do this.
// lookup the method object and get its index
- Method method = proxyImpl.getMethod(signature.getMethodName(), params);
+ Method method = signature.getMethod(proxyImpl);
return getSuperIndex(proxyImpl, method);
} catch (Exception e) {
// didn't find the method