public class CglibProxyFactory extends BaseProxyFactory
ProxyFactory implementation using CGLIB.
| Constructor and Description |
|---|
CglibProxyFactory() |
CglibProxyFactory(ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
<T> InterceptorBuilder<T> |
buildInterceptor(Class<T> proxyClass)
The proxy class in this implementation does not have to be an interface.
|
Object |
createProxy(Class<?>[] proxyInterfaces,
ProxyHandler<?> handler)
The proxy classes must be interfaces, or an
GenerationException will be thrown. |
<T> T |
createProxy(Class<T> proxyClass,
javax.inject.Provider<T> provider)
The proxy class in this implementation does not have to be an interface.
|
<T> T |
createProxy(Class<T> proxyClass,
ProxyHandler<T> handler)
The proxy class in this implementation does not have to be an interface.
|
assertClassVisible, assertInterfaces, createProxy, getNamingStrategy, getPreferredClassLoader, getProxyClassLoader, setNamingStrategypublic CglibProxyFactory()
@Inject public CglibProxyFactory(ClassLoader loader)
public <T> T createProxy(Class<T> proxyClass, javax.inject.Provider<T> provider) throws GenerationException
T - The proxy typeproxyClass - The proxied classprovider - The provider of the proxied objectGenerationException - If an error occurs creating the proxyProxyFactory.createProxy(Class, javax.inject.Provider)public <T> T createProxy(Class<T> proxyClass, ProxyHandler<T> handler) throws GenerationException
T - The proxy typeproxyClass - The proxied interface classhandler - The handler for the method invocationGenerationException - If an error occurs creating the proxyProxyFactory.createProxy(Class, org.proxy4j.core.ProxyHandler)public Object createProxy(Class<?>[] proxyInterfaces, ProxyHandler<?> handler) throws GenerationException
GenerationException will be thrown.proxyInterfaces - The interfaces that the proxy class must implementhandler - The handler for the method invocationGenerationException - If an error occurs creating the proxyProxyFactory.createProxy(Class[], org.proxy4j.core.ProxyHandler)public <T> InterceptorBuilder<T> buildInterceptor(Class<T> proxyClass)
T - The proxy typeproxyClass - The class of the proxy (and target)ProxyFactory.buildInterceptor(Class)Copyright © 2014. All rights reserved.