Class ProxyFactory
java.lang.Object
com.gigaspaces.internal.reflection.fast.proxy.ProxyFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectnewProxyInstance(ClassLoader loader, Class<?>[] interfaces, ProxyInvocationHandler handler, boolean allowCache) Returns an instance of a class for the specified interfaces that dispatches method invocations to the specified invocation handler.
-
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 toloader- the class loader to define the proxy classinterfaces- 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 togetProxyClassare violatedNullPointerException- if theinterfacesarray argument or any of its elements arenull, or if the invocation handler,h, isnull
-