T
- the type of delegate
public class SimpleInvocationHandler<T>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
SimpleInvocationHandler
class is useful in conjunction with Proxy.newProxyInstance(java.lang.ClassLoader, java.lang.Class<?>[], java.lang.reflect.InvocationHandler)
to narrow the interface of a given class.Constructor and Description |
---|
SimpleInvocationHandler(T delegate)
Create a new
SimpleInvocationHandler with the given delegate. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) |
public SimpleInvocationHandler(T delegate)
SimpleInvocationHandler
with the given delegate.delegate
- the delegate to which all method invocations will be forwardedjava.lang.IllegalArgumentException
- if the delegate is null