Class RelayInvocationHandler

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

    public class RelayInvocationHandler
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    This invocation handler simply relays invoke to another invocation handler, except that it intercepts equals(Object), hashCode(), and toString()
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.reflect.InvocationHandler relay  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.InvocationHandler getRelay()  
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args)  
      protected java.lang.Boolean proxyEquals​(java.lang.Object proxy, java.lang.Object other)  
      protected java.lang.Integer proxyHashCode​(java.lang.Object proxy)  
      protected java.lang.String proxyToString​(java.lang.Object proxy)  
      void setRelay​(java.lang.reflect.InvocationHandler handler)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • relay

        protected java.lang.reflect.InvocationHandler relay
    • Constructor Detail

      • RelayInvocationHandler

        public RelayInvocationHandler()
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method m,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • getRelay

        public java.lang.reflect.InvocationHandler getRelay()
      • setRelay

        public void setRelay​(java.lang.reflect.InvocationHandler handler)
      • proxyHashCode

        protected java.lang.Integer proxyHashCode​(java.lang.Object proxy)
      • proxyEquals

        protected java.lang.Boolean proxyEquals​(java.lang.Object proxy,
                                                java.lang.Object other)
      • proxyToString

        protected java.lang.String proxyToString​(java.lang.Object proxy)