Package spin.proxy
Class JDKProxyFactory
- java.lang.Object
-
- spin.ProxyFactory
-
- spin.proxy.JDKProxyFactory
-
public class JDKProxyFactory extends ProxyFactory
A factory of proxies utilizing JDK virtual proxies.
-
-
Constructor Summary
Constructors Constructor Description JDKProxyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanareProxyEqual(java.lang.Object proxy1, java.lang.Object proxy2)Test if the given proxies of this factory are intercepting the same object.java.lang.ObjectcreateProxy(java.lang.Object object, Evaluator evaluator)The created proxy will not implement non-public interfaces from different class loaders since these yield anIllegalAccessErroron construction of a proxy.booleanisProxy(java.lang.Object object)Test if the given object is a proxy created by this factory.-
Methods inherited from class spin.ProxyFactory
evaluteInvocation
-
-
-
-
Method Detail
-
createProxy
public java.lang.Object createProxy(java.lang.Object object, Evaluator evaluator)The created proxy will not implement non-public interfaces from different class loaders since these yield anIllegalAccessErroron construction of a proxy.- Specified by:
createProxyin classProxyFactory- Parameters:
object- object to create proxy forevaluator- evaluator to evaluate invocations with- Returns:
- new proxy
-
isProxy
public boolean isProxy(java.lang.Object object)
Description copied from class:ProxyFactoryTest if the given object is a proxy created by this factory.- Specified by:
isProxyin classProxyFactory- Parameters:
object- object to test- Returns:
trueif given object is a Spin proxy,falseotherwise
-
areProxyEqual
protected boolean areProxyEqual(java.lang.Object proxy1, java.lang.Object proxy2)Description copied from class:ProxyFactoryTest if the given proxies of this factory are intercepting the same object.- Specified by:
areProxyEqualin classProxyFactory- Parameters:
proxy1- first proxyproxy2- second proxy- Returns:
- true if both proxies are intercepting the same object
-
-