public class Proxy
extends java.lang.reflect.Proxy
Modifier | Constructor and Description |
---|---|
protected |
Proxy(java.lang.reflect.InvocationHandler h)
Constructs a new Proxy instance from a subclass (typically, a dynamic
proxy class) with the specified value for its invocation handler.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
newProxyInstance(long tstate,
long ltarget,
Jep jep,
java.lang.ClassLoader loader,
java.lang.String[] interfaces)
Returns an instance of a proxy class for the specified
interfaces that dispatches method invocations to the specified
invocation handler.
|
protected Proxy(java.lang.reflect.InvocationHandler h)
h
- an InvocationHandler
valuepublic static java.lang.Object newProxyInstance(long tstate, long ltarget, Jep jep, java.lang.ClassLoader loader, java.lang.String[] interfaces)
Returns an instance of a proxy class for the specified interfaces that dispatches method invocations to the specified invocation handler. This method is equivalent to: Proxy.getProxyClass(loader, interfaces). getConstructor(new Class[] { InvocationHandler.class }). newInstance(new Object[] { handler }); Proxy.newProxyInstance throws IllegalArgumentException for the same reasons that Proxy.getProxyClass does.
tstate
- a long
valueltarget
- a long
valuejep
- a Jep
valueloader
- the class loader to define the proxy classinterfaces
- the list of interfaces to implementObject
valuejava.lang.IllegalArgumentException
- if an error occurs