Class ProxyFactory

java.lang.Object
com.gigaspaces.internal.reflection.fast.proxy.ProxyFactory

public class ProxyFactory extends Object
  • Constructor Details

    • ProxyFactory

      public ProxyFactory()
  • Method Details

    • newProxyInstance

      public static Object newProxyInstance(ClassLoader loader, Class<?>[] interfaces, ProxyInvocationHandler handler, boolean allowCache) throws IllegalArgumentException
      Returns an instance of a class for the specified interfaces that dispatches method invocations to the specified invocation handler.
      Parameters:
      handler - the invocation handler to dispatch method invocations to
      loader - the class loader to define the proxy class
      interfaces - the list of interfaces for the proxy class to implement
      Returns:
      a proxy instance with the specified invocation handler of a proxy class that is defined by the specified class loader and that implements the specified interfaces
      Throws:
      IllegalArgumentException - if any of the restrictions on the parameters that may be passed to getProxyClass are violated
      NullPointerException - if the interfaces array argument or any of its elements are null, or if the invocation handler, h, is null