public class CglibProxyFactory
extends java.lang.Object
ProxyFactory
based on CGLIB.com.thoughtworks.proxy.factory
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.reflect.Method |
getInvoker
The getInvoker method.
|
Constructor and Description |
---|
CglibProxyFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
canProxy(java.lang.Class type)
Test if the ProxyFactory implementation is capable of creating a proxy instance for the given type.
|
java.lang.Object |
createProxy(java.lang.Class[] types,
Invoker invoker)
Create a new proxy instance.
|
Invoker |
getInvoker(java.lang.Object proxy)
Retrieve the invocation handler of the proxy.
|
boolean |
isProxyClass(java.lang.Class type)
Test if the given type is a proxy class.
|
public static final java.lang.reflect.Method getInvoker
public java.lang.Object createProxy(java.lang.Class[] types, Invoker invoker)
Note: If any type the proxy instance must fullfill are all interfaces, the factory will currently create a proxy based on the JDK.
types
- the types the proxy must emulate.invoker
- the invocation handler.public boolean canProxy(java.lang.Class type)
ProxyFactory
type
- the type to create a proxy instance for.true
if the type is supported.public boolean isProxyClass(java.lang.Class type)
ProxyFactory
type
- the type to examin.true
if the given type is a proxy class.public Invoker getInvoker(java.lang.Object proxy)
InvokerReference
to every proxy instance.getInvoker
in interface ProxyFactory
proxy
- the proxy instance.Invoker
instance acting as invocation handler.