| java.lang.Object com.tc.aspectwerkz.proxy.Proxy
Proxy | public class Proxy (Code) | | Facade for Proxy service. Proxy are exposed to the weaver upon compilation, and can be made Advisable as well.
We provide 2 proxy strategy: one by subclassing a non final concrete class, and thus having the proxy delegate to the
real implementation thru super.xxx(..) calls, and one by delegating to N implementations of N interfaces. Proxy
strategy provide a cache mechanism if ones wants to cache the compiled proxy. Pointcut to match delegating
proxies should use a "+" as for regular subtype matching. Pointcut to match subclassing proxies don't need to
use a "+" - precisely to avoid pointcut refactoring to match them.
author: Jonas BonŽr author: Alexandre Vasseur |
Method Summary | |
static void | makeProxyAdvisable(String proxyClassName, ClassLoader loader, SystemDefinition definition) Enhances the proxy class with the Advisable mixin, to allow runtime per instance additions of interceptors. | public static Object | newInstance(Class clazz, SystemDefinition definition) Creates a new subclassing proxy instance based for the class specified and instantiates it using its default
no-argument constructor. | public static Object | newInstance(Class clazz, Class[] argumentTypes, Object[] argumentValues, SystemDefinition definition) Creates a new subclassing proxy instance for the class specified and instantiates it using the constructor matching
the argument type array specified. | public static Object | newInstance(Class clazz, boolean useCache, boolean makeAdvisable, SystemDefinition definition) Creates a new subclassing proxy instance based for the class specified and instantiates it using its default
no-argument constructor.
Parameters: clazz - the target class to make a proxy for Parameters: useCache - true if a cached instance of the proxy classed should be used Parameters: makeAdvisable - true if the proxy class should implement the Advisable interface, e.g. | public static Object | newInstance(Class clazz, Class[] argumentTypes, Object[] argumentValues, boolean useCache, boolean makeAdvisable, SystemDefinition definition) Creates a new subclassing proxy instance for the class specified and instantiates it using the constructor matching
the argument type array specified.
Parameters: clazz - the target class to make a proxy for Parameters: argumentTypes - the argument types matching the signature of the constructor to use when instantiating theproxy Parameters: argumentValues - the argument values to use when instantiating the proxy Parameters: useCache - true if a cached instance of the proxy classed should be used Parameters: makeAdvisable - true if the proxy class should implement the Advisable interface, e.g. | public static Object | newInstance(Class[] interfaces, Object[] implementations, boolean useCache, boolean makeAdvisable, SystemDefinition definition) Create a delegation proxy or retrieve it from cache and instantiate it, using the given implementations. |
makeProxyAdvisable | static void makeProxyAdvisable(String proxyClassName, ClassLoader loader, SystemDefinition definition)(Code) | | Enhances the proxy class with the Advisable mixin, to allow runtime per instance additions of interceptors. Simply
register in the system definition.
Parameters: proxyClassName - Parameters: loader - |
newInstance | public static Object newInstance(Class clazz, SystemDefinition definition)(Code) | | Creates a new subclassing proxy instance based for the class specified and instantiates it using its default
no-argument constructor. The proxy will be cached and non-advisable.
Parameters: clazz - the target class to make a proxy for the proxy instance |
newInstance | public static Object newInstance(Class clazz, Class[] argumentTypes, Object[] argumentValues, SystemDefinition definition)(Code) | | Creates a new subclassing proxy instance for the class specified and instantiates it using the constructor matching
the argument type array specified. The proxy will be cached and non-advisable.
Parameters: clazz - the target class to make a proxy for Parameters: argumentTypes - the argument types matching the signature of the constructor to use when instantiating theproxy Parameters: argumentValues - the argument values to use when instantiating the proxy the proxy instance |
newInstance | public static Object newInstance(Class clazz, boolean useCache, boolean makeAdvisable, SystemDefinition definition)(Code) | | Creates a new subclassing proxy instance based for the class specified and instantiates it using its default
no-argument constructor.
Parameters: clazz - the target class to make a proxy for Parameters: useCache - true if a cached instance of the proxy classed should be used Parameters: makeAdvisable - true if the proxy class should implement the Advisable interface, e.g. beprepared for programmatic, runtime, per instance hot deployement of advice the proxy instance |
newInstance | public static Object newInstance(Class clazz, Class[] argumentTypes, Object[] argumentValues, boolean useCache, boolean makeAdvisable, SystemDefinition definition)(Code) | | Creates a new subclassing proxy instance for the class specified and instantiates it using the constructor matching
the argument type array specified.
Parameters: clazz - the target class to make a proxy for Parameters: argumentTypes - the argument types matching the signature of the constructor to use when instantiating theproxy Parameters: argumentValues - the argument values to use when instantiating the proxy Parameters: useCache - true if a cached instance of the proxy classed should be used Parameters: makeAdvisable - true if the proxy class should implement the Advisable interface, e.g. beprepared for programmatic, runtime, per instance hot deployement of advice the proxy instance |
newInstance | public static Object newInstance(Class[] interfaces, Object[] implementations, boolean useCache, boolean makeAdvisable, SystemDefinition definition)(Code) | | Create a delegation proxy or retrieve it from cache and instantiate it, using the given implementations. Each
implementation must implement the respective given interface.
Parameters: interfaces - Parameters: implementations - Parameters: useCache - Parameters: makeAdvisable - |
|
|