public class CglibProxyFactory extends Object
ProxyFactory
based on CGLIB.com.thoughtworks.proxy.factory
,
Serialized FormModifier and Type | Field and Description |
---|---|
static Method |
getInvoker
The getInvoker method.
|
Constructor and Description |
---|
CglibProxyFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
canProxy(Class<?> type)
Test if the ProxyFactory implementation is capable of creating a proxy instance for the given type.
|
<T> T |
createProxy(Invoker invoker,
Class<?>... types)
Create a new proxy instance.
|
Invoker |
getInvoker(Object proxy)
Retrieve the invocation handler of the proxy.
|
boolean |
isProxyClass(Class<?> type)
Test if the given type is a proxy class.
|
public static final Method getInvoker
public CglibProxyFactory()
public <T> T createProxy(Invoker invoker, Class<?>... types)
Note: If any type the proxy instance must fulfill are all interfaces, the factory will currently create a proxy based on the JDK.
T
- The proxy's type.invoker
- the invocation handler.types
- the types the proxy must emulate.public boolean canProxy(Class<?> type)
ProxyFactory
type
- the type to create a proxy instance for.true
if the type is supported.public boolean isProxyClass(Class<?> type)
ProxyFactory
type
- the type to examine.true
if the given type is a proxy class.public Invoker getInvoker(Object proxy)
InvokerReference
to every proxy instance.getInvoker
in interface ProxyFactory
proxy
- the proxy instance.Invoker
instance acting as invocation handler.Copyright © 2005–2016 Codehaus. All rights reserved.