Package spin.proxy

Class CGLibProxyFactory

java.lang.Object
spin.ProxyFactory
spin.proxy.CGLibProxyFactory

public class CGLibProxyFactory extends ProxyFactory
A factory of proxies utilizing CGLib.
  • Constructor Details

    • CGLibProxyFactory

      public CGLibProxyFactory()
  • Method Details

    • createProxy

      public Object createProxy(Object object, Evaluator evaluator)
      Description copied from class: ProxyFactory
      Create a proxy for the given object that evaluates invocations with the given evaluator.
      Specified by:
      createProxy in class ProxyFactory
      Parameters:
      object - object to create proxy for
      evaluator - evaluator to evaluate invocations with
      Returns:
      new proxy
    • isProxy

      public boolean isProxy(Object object)
      Description copied from class: ProxyFactory
      Test if the given object is a proxy created by this factory.
      Specified by:
      isProxy in class ProxyFactory
      Parameters:
      object - object to test
      Returns:
      true if given object is a Spin proxy, false otherwise
    • areProxyEqual

      protected boolean areProxyEqual(Object proxy1, Object proxy2)
      Description copied from class: ProxyFactory
      Test if the given proxies of this factory are intercepting the same object.
      Specified by:
      areProxyEqual in class ProxyFactory
      Parameters:
      proxy1 - first proxy
      proxy2 - second proxy
      Returns:
      true if both proxies are intercepting the same object