public class MethodDelegation<T>
extends java.lang.Object
Constructor and Description |
---|
MethodDelegation() |
Modifier and Type | Method and Description |
---|---|
MethodDelegation<T> |
filterOverriddenMethod(java.util.function.Predicate<java.lang.reflect.Method> receiver) |
static <T> MethodDelegation<T> |
instanceDelegation(java.lang.Object intercepter)
An intercepter which delegates invocation of every method which is present on
the given object, or which overrides a method which is present on the given
object, using the given object as the receiver.
|
static <T> MethodDelegation<T> |
invocationDelegation(java.lang.reflect.InvocationHandler handler) |
public static <T> MethodDelegation<T> instanceDelegation(java.lang.Object intercepter)
Classes defined by way of such an intercepter may not be serialized and must be instantiated from within the defining JVM instance, as they are dependent on the specific instance given.
intercepter
- the object to which invocation should be delegatedpublic static <T> MethodDelegation<T> invocationDelegation(java.lang.reflect.InvocationHandler handler)
public MethodDelegation<T> filterOverriddenMethod(java.util.function.Predicate<java.lang.reflect.Method> receiver)