Package org.logicalcobwebs.proxool.proxy
Class InvokerFacade
- java.lang.Object
-
- org.logicalcobwebs.proxool.proxy.InvokerFacade
-
public class InvokerFacade extends java.lang.Object
Invokes a method using a cached method.- Since:
- Proxool 0.9
- Version:
- $Revision: 1.3 $, $Date: 2004/07/13 21:13:14 $
- Author:
- billhorsman, $Author: billhorsman $ (current maintainer)
-
-
Constructor Summary
Constructors Constructor Description InvokerFacade()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.reflect.Method
getConcreteMethod(java.lang.Class concreteClass, java.lang.reflect.Method injectableMethod)
Returns the method in the concrete class with an indentical signature to that passedstatic void
overrideConcreteMethod(java.lang.Class concreteClass, java.lang.reflect.Method injectableMethod, java.lang.reflect.Method overridenMethod)
Override the method provided by thegetConcreteMethod(java.lang.Class, java.lang.reflect.Method)
.
-
-
-
Method Detail
-
getConcreteMethod
public static java.lang.reflect.Method getConcreteMethod(java.lang.Class concreteClass, java.lang.reflect.Method injectableMethod) throws ProxoolException
Returns the method in the concrete class with an indentical signature to that passed- Parameters:
concreteClass
- the class that we want to invoke methods on. It should either implement all methods on the injectable interface, or provide methods with an identical signature.injectableMethod
- provides signature that we are trying to match- Returns:
- the method in the concrete class that we can invoke as if it were in the interface
- Throws:
ProxoolException
- if the method is not found.
-
overrideConcreteMethod
public static void overrideConcreteMethod(java.lang.Class concreteClass, java.lang.reflect.Method injectableMethod, java.lang.reflect.Method overridenMethod)
Override the method provided by thegetConcreteMethod(java.lang.Class, java.lang.reflect.Method)
. Use this if you decide that the concrete method provided wasn't any good. For instance, if you get an IllegalAccessException whilst invoking the concrete method then you should perhaps try using the proxy supplied method instead.- Parameters:
concreteClass
- the class we are invoking uponinjectableMethod
- the method supplied by the proxyoverridenMethod
- the one we are going to use (probably the same as injectrableMethod actually)
-
-