Class Proxies


  • public final class Proxies
    extends Object
    • Method Detail

      • newInstance

        public static <T> T newInstance​(Object delegate,
                                        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