Class ProxyInstanceFactory


  • public class ProxyInstanceFactory
    extends Object
    The type Proxy instance factory.
    Version:
    1.0.0
    Author:
    Gang Cheng
    • Constructor Detail

      • ProxyInstanceFactory

        public ProxyInstanceFactory()
    • Method Detail

      • newInstanceOfInterfaces

        public static <T> T newInstanceOfInterfaces​(Class<T> interfaceType,
                                                    Supplier<InvocationHandler> invocationHandlerSupplier,
                                                    Class<?>... otherInterfaces)
        new instance of target class
        Type Parameters:
        T - the type parameter
        Parameters:
        interfaceType - the interface type
        invocationHandlerSupplier - the invocation handler supplier
        otherInterfaces - the other interfaces
        Returns:
        t
        Throws:
        IllegalStateException - when unable create target interface Proxy Class