Class Proxies


  • public final class Proxies
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T newInstance​(java.lang.Object delegate, java.lang.reflect.Method... methodsAndDelegateMethod)  
      • Methods inherited from class java.lang.Object

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

      • newInstance

        public static <T> T newInstance​(java.lang.Object delegate,
                                        java.lang.reflect.Method... methodsAndDelegateMethod)
        Type Parameters:
        T - The interface that declares the method
        Parameters:
        methodsAndDelegateMethod - Pairs of methods declared in T and methods declared in delegate.getClass()
        Returns:
        An object that implements the interface that declares the methods, and delegates all invocations of the methods to the delegate and the delegateMethods