T
- The class of the object which will be proxiedpublic class GenericInvocationHandler<T> extends Object implements net.sf.cglib.proxy.InvocationHandler
InvocationHandler
interface which delegates the invocation of Delegate
objects
based on pattern matching against the method.
Note: Delegates for methods defined in the Wrapper
and @P6Proxy
interfaces as well as Object.equals(Object)
are automatically added.Constructor and Description |
---|
GenericInvocationHandler(T underlying)
Creates a new invocation handler for the given object.
|
Modifier and Type | Method and Description |
---|---|
void |
addDelegate(MethodMatcher methodMatcher,
Delegate delegate)
Adds a delegate which will be used when a method is invoked that meets the following criteria:
|
static void |
clearCache() |
protected T |
getUnderlying() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
public GenericInvocationHandler(T underlying)
underlying
- The object being proxiedpublic void addDelegate(MethodMatcher methodMatcher, Delegate delegate)
methodMatcher.match(method) == true
MethodMatcher#equals(Object)
and com.p6spy.engine.proxy.MethodMatcher#hashCode()
will replace the previous delegate!methodMatcher
- The method matcherdelegate
- The delegate objectpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface net.sf.cglib.proxy.InvocationHandler
Throwable
protected T getUnderlying()
public static void clearCache()
Copyright © 2002-2014 P6Spy. All Rights Reserved.