|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.reflect.Proxy
public class Proxy
This class provides methods to creating dynamic proxy classes and instances.
InvocationHandler,
Serialized Form| Field Summary | |
|---|---|
protected InvocationHandler |
h
|
| Constructor Summary | |
|---|---|
protected |
Proxy(InvocationHandler h)
|
| Method Summary | |
|---|---|
static InvocationHandler |
getInvocationHandler(Object proxy)
Return the proxy instance's invocation handler. |
static Class<?> |
getProxyClass(ClassLoader loader,
Class<?>... interfaces)
Return the dynamically build class for the given interfaces, build a new one when necessary. |
static boolean |
isProxyClass(Class<?> cl)
Return whether the supplied class is a dynamically generated proxy class. |
static Object |
newProxyInstance(ClassLoader loader,
Class<?>[] interfaces,
InvocationHandler h)
Return an instance of the dynamically build class for the given interfaces that forwards methods to the specified invocation handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected InvocationHandler h
| Constructor Detail |
|---|
protected Proxy(InvocationHandler h)
| Method Detail |
|---|
public static Class<?> getProxyClass(ClassLoader loader,
Class<?>... interfaces)
throws IllegalArgumentException
loader - the class loader that will define the proxy class.interfaces - an array of Class objects, each one identifying
an interface that the new proxy must implement
interfaces.
IllegalArgumentException
NullPointerException - if either interfaces or any of its elements
are null.
public static Object newProxyInstance(ClassLoader loader,
Class<?>[] interfaces,
InvocationHandler h)
throws IllegalArgumentException
loader - the class loader that will define the proxy class.interfaces - the list of interfaces to implement.h - the invocation handler for the forwarded methods.
h
IllegalArgumentException
NullPointerException - if the interfaces or any of its elements are null.public static boolean isProxyClass(Class<?> cl)
cl - the class.
NullPointerException - if the class is null.
public static InvocationHandler getInvocationHandler(Object proxy)
throws IllegalArgumentException
proxy - the proxy instance.
IllegalArgumentException - if the supplied proxy is not a proxy
object.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||