public class Proxy extends Object implements Serializable
or found using the static method getProxyClass(ClassLoader cl, Class[] interfaces)
.
(*) There seems to be no way to delete a dynamic proxy, so it will stay in the list of known proxies for the lifetime of the VM.
Modifier and Type | Field and Description |
---|---|
protected InvocationHandler |
h
The InvocationHandler for this instance.
|
Modifier | Constructor and Description |
---|---|
protected |
Proxy(InvocationHandler h)
When an instance of a dynamic proxy class is created, an InvocationHandler
is specified.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Default object equality (is identity).
|
static InvocationHandler |
getInvocationHandler(Object object)
You can ask an instance of a dynamic proxy class for its InvocationHandler.
|
static Class |
getProxyClass(ClassLoader loader,
Class[] interfaces) |
int |
hashCode()
The (default) object hashcode: for transient objects this is simply the
address of the instance in memory, for persistent objects it is the
address at which the instance was first created (maybe in a previous
activation of the VM).
|
static boolean |
isProxyClass(Class clazz) |
static Object |
newProxyInstance(ClassLoader loader,
Class[] interfaces,
InvocationHandler h) |
String |
toString()
Default String representation: overriden by many classes.
|
protected InvocationHandler h
protected Proxy(InvocationHandler h)
public static InvocationHandler getInvocationHandler(Object object) throws IllegalArgumentException
IllegalArgumentException
public static Class getProxyClass(ClassLoader loader, Class[] interfaces) throws IllegalArgumentException
IllegalArgumentException
public static boolean isProxyClass(Class clazz)
public static Object newProxyInstance(ClassLoader loader, Class[] interfaces, InvocationHandler h) throws IllegalArgumentException
IllegalArgumentException
public int hashCode()
Object
public boolean equals(Object o)
Object