org.apache.commons.proxy.factory.javassist
Class JavassistProxyFactory
java.lang.Object
org.apache.commons.proxy.ProxyFactory
org.apache.commons.proxy.factory.util.AbstractSubclassingProxyFactory
org.apache.commons.proxy.factory.javassist.JavassistProxyFactory
public class JavassistProxyFactory
- extends AbstractSubclassingProxyFactory
A Javassist-based ProxyFactory
implementation.
Dependencies: - Javassist version 3.0 or greater
- Since:
- 1.0
- Author:
- James Carman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavassistProxyFactory
public JavassistProxyFactory()
createDelegatorProxy
public Object createDelegatorProxy(ClassLoader classLoader,
ObjectProvider targetProvider,
Class[] proxyClasses)
- Description copied from class:
ProxyFactory
- Creates a proxy which delegates to the object provided by
delegateProvider
.
- Overrides:
createDelegatorProxy
in class ProxyFactory
- Parameters:
classLoader
- the class loader to use when generating the proxytargetProvider
- the delegate providerproxyClasses
- the interfaces that the proxy should implement
- Returns:
- a proxy which delegates to the object provided by the target
delegateProvider>
createInterceptorProxy
public Object createInterceptorProxy(ClassLoader classLoader,
Object target,
Interceptor interceptor,
Class[] proxyClasses)
- Description copied from class:
ProxyFactory
- Creates a proxy which passes through a
interceptor
before eventually reaching the
target
object.
- Overrides:
createInterceptorProxy
in class ProxyFactory
- Parameters:
classLoader
- the class loader to use when generating the proxytarget
- the target objectinterceptor
- the method interceptorproxyClasses
- the interfaces that the proxy should implement.
- Returns:
- a proxy which passes through a
interceptor
before eventually reaching the
target
object.
createInvokerProxy
public Object createInvokerProxy(ClassLoader classLoader,
Invoker invoker,
Class[] proxyClasses)
- Description copied from class:
ProxyFactory
- Creates a proxy which uses the provided
Invoker
to handle all method invocations.
- Overrides:
createInvokerProxy
in class ProxyFactory
- Parameters:
classLoader
- the class loader to use when generating the proxyinvoker
- the invokerproxyClasses
- the interfaces that the proxy should implement
- Returns:
- a proxy which uses the provided
Invoker
to handle all method invocations
Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.