FileDocCategorySizeDatePackage
InvocationHandler.javaAPI DocAndroid 1.5 API2594Wed May 06 22:41:04 BST 2009java.lang.reflect

InvocationHandler

public interface InvocationHandler
Implementors of this interface dispatch methods invoked on proxy instances.
see
Proxy
since
Android 1.0

Fields Summary
Constructors Summary
Methods Summary
public java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
Handles the method which was originally invoked on the proxy instance. A typical usage pattern follows below:
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
//do some processing before the method invocation

//invoke the method
Object result = method.invoke(proxy, args);

//do some processing after the method invocation
return result;
}

param
proxy the proxy instance on which the method was invoked
param
method the method invoked on the proxy instance
param
args an array of objects containing the parameters passed to the method, or {@code null} if no arguments are expected. Primitive types are wrapped in the appropriate wrapper type
return
the result of executing the method. Primitive types need to be wrapped in the appropriate wrapper type
throws
Throwable the exception to throw from the invoked method on the proxy. The exception must match one of the declared exception types of the invoked method or any unchecked exception type. If not then an {@code UndeclaredThrowableException} is thrown
since
Android 1.0