[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool/proxy InvokerFacade.java,1.2,1.3
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2004-07-13 21:13:23
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13723/src/java/org/logicalcobwebs/proxool/proxy Modified Files: InvokerFacade.java Log Message: Optimise using injectable interfaces on methods that are declared in non-public classes by not bothering to use concrete methods at all (it's not possible). Index: InvokerFacade.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/proxy/InvokerFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InvokerFacade.java 13 Jul 2004 21:06:16 -0000 1.2 --- InvokerFacade.java 13 Jul 2004 21:13:14 -0000 1.3 *************** *** 11,14 **** --- 11,15 ---- import java.util.HashMap; import java.lang.reflect.Method; + import java.lang.reflect.Modifier; /** *************** *** 32,42 **** */ public static Method getConcreteMethod(Class concreteClass, Method injectableMethod) throws ProxoolException { ! Object key = concreteClass.getName() + ":" + injectableMethod.getName(); ! MethodMapper methodMapper = (MethodMapper) methodMappers.get(key); ! if (methodMapper == null) { ! methodMapper = new MethodMapper(concreteClass); ! methodMappers.put(key, methodMapper); } - return methodMapper.getConcreteMethod(injectableMethod); } --- 33,48 ---- */ public static Method getConcreteMethod(Class concreteClass, Method injectableMethod) throws ProxoolException { ! // Unless the concrete class is public we can't do anything ! if (Modifier.isPublic(concreteClass.getModifiers())) { ! Object key = concreteClass.getName() + ":" + injectableMethod.getName(); ! MethodMapper methodMapper = (MethodMapper) methodMappers.get(key); ! if (methodMapper == null) { ! methodMapper = new MethodMapper(concreteClass); ! methodMappers.put(key, methodMapper); ! } ! return methodMapper.getConcreteMethod(injectableMethod); ! } else { ! return injectableMethod; } } *************** *** 63,66 **** --- 69,75 ---- Revision history: $Log$ + Revision 1.3 2004/07/13 21:13:14 billhorsman + Optimise using injectable interfaces on methods that are declared in non-public classes by not bothering to use concrete methods at all (it's not possible). + Revision 1.2 2004/07/13 21:06:16 billhorsman Fix problem using injectable interfaces on methods that are declared in non-public classes. |