public class ProxyClass
extends java.lang.Object
| Constructor and Description |
|---|
ProxyClass(java.lang.Class<?> proxyClass,
InvocationHandler invocationHandler) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
allocateInstance()
Allocate a new instance of the proxy class without calling a constructor.
|
InvocationHandler |
getInvocationHandler() |
java.lang.Class<?> |
getProxyClass() |
<T> T |
instantiate(java.lang.Class<?>[] constructorParameters,
java.lang.Object[] constructorArguments)
Instantiate a new instance of the proxy class with the given constructor parameters and arguments.
|
void |
setInvocationHandler(InvocationHandler invocationHandler)
Sets the invocation handler for the proxy class.
|
public ProxyClass(java.lang.Class<?> proxyClass,
InvocationHandler invocationHandler)
public java.lang.Class<?> getProxyClass()
public InvocationHandler getInvocationHandler()
public void setInvocationHandler(InvocationHandler invocationHandler)
invocationHandler - The invocation handlerpublic <T> T allocateInstance()
T - The type of the proxy classpublic <T> T instantiate(java.lang.Class<?>[] constructorParameters,
java.lang.Object[] constructorArguments)
T - The type of the proxy classconstructorParameters - The parameters of the constructorconstructorArguments - The arguments for the constructor