I - the type of interface to handle invocations for.public class DynamicProxy<I> extends Object implements InvocationHandler
Example:
private
| Modifier and Type | Class and Description |
|---|---|
static interface |
DynamicProxy.DynamicProxyInvocationHandler<I>
Dynamic proxy invocation handler.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,I extends T> |
createProxy(I delegate,
DynamicProxy.DynamicProxyInvocationHandler<I> invocationHandler)
Creates a dynamic proxy.
|
static <T> String |
getMethodSignature(Class<T> clazz,
Method method)
Gets a string representing the method signature (For debug purposes).
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
public static <T,I extends T> T createProxy(I delegate,
DynamicProxy.DynamicProxyInvocationHandler<I> invocationHandler)
T - type of the interface to create a proxy for. T must be an
interface.I - type of the subclass to delegate invocations to.delegate - delegate to create a proxy for.invocationHandler - proxy invocation handler.public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowablepublic static <T> String getMethodSignature(Class<T> clazz, Method method)
T - Type of the class.clazz - Class to get the method signature for.method - Method.Copyright © 2014. All Rights Reserved.