Package de.alpharogroup.model.reflect
Class CachingProxyFactory
- java.lang.Object
-
- de.alpharogroup.model.reflect.CachingProxyFactory
-
- All Implemented Interfaces:
IProxyFactory
public class CachingProxyFactory extends java.lang.Object implements IProxyFactory
A factory caching proxy classes.- See Also:
createClass(Class)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.alpharogroup.model.reflect.IProxyFactory
IProxyFactory.Callback
-
-
Constructor Summary
Constructors Constructor Description CachingProxyFactory(IProxyFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>
createClass(java.lang.Class<?> clazz)
Create a proxy class for the given class.java.lang.Object
createInstance(java.lang.Class<?> proxyClass, IProxyFactory.Callback callback)
Create a proxy instance.void
destroy(java.lang.Object application)
IProxyFactory.Callback
getCallback(java.lang.Object proxy)
Get the callback for the given proxy.
-
-
-
Constructor Detail
-
CachingProxyFactory
public CachingProxyFactory(IProxyFactory factory)
-
-
Method Detail
-
createClass
public java.lang.Class<?> createClass(java.lang.Class<?> clazz)
Description copied from interface:IProxyFactory
Create a proxy class for the given class.- Specified by:
createClass
in interfaceIProxyFactory
- Parameters:
clazz
- class to proxy- Returns:
- proxy class
-
createInstance
public java.lang.Object createInstance(java.lang.Class<?> proxyClass, IProxyFactory.Callback callback)
Description copied from interface:IProxyFactory
Create a proxy instance.- Specified by:
createInstance
in interfaceIProxyFactory
- Parameters:
proxyClass
- class of proxycallback
- callback for invocations- Returns:
- proxy instance
-
destroy
public void destroy(java.lang.Object application)
-
getCallback
public IProxyFactory.Callback getCallback(java.lang.Object proxy)
Description copied from interface:IProxyFactory
Get the callback for the given proxy.- Specified by:
getCallback
in interfaceIProxyFactory
- Parameters:
proxy
- proxy- Returns:
- callback or
null
if not a proxy
-
-