public class LocalBeanProxyFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LocalBeanProxyFactory.Unsafe
The methods of this class model sun.misc.Unsafe which is used reflectively
|
Modifier and Type | Field and Description |
---|---|
static java.lang.reflect.InvocationHandler |
NON_BUSINESS_HANDLER |
Constructor and Description |
---|
LocalBeanProxyFactory() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
constructProxy(java.lang.Class clazz,
java.lang.reflect.InvocationHandler handler) |
static java.lang.Class |
createProxy(java.lang.Class<?> classToProxy,
java.lang.ClassLoader cl,
java.lang.Class... interfaces) |
static java.lang.Class |
createProxy(java.lang.Class<?> classToProxy,
java.lang.ClassLoader cl,
java.lang.String proxyName,
java.lang.Class... interfaces) |
static byte[] |
generateProxy(java.lang.Class<?> classToProxy,
java.lang.String proxyName,
java.lang.Class<?>... interfaces) |
static java.lang.String |
getAsmTypeAsString(java.lang.Class<?> parameterType,
boolean wrap)
Converts a class to a String suitable for ASM.
|
static java.lang.reflect.InvocationHandler |
getInvocationHandler(java.lang.Object proxy) |
static boolean |
isProxy(java.lang.Class<?> clazz) |
static java.lang.Object |
newProxyInstance(java.lang.ClassLoader classLoader,
java.lang.reflect.InvocationHandler handler,
java.lang.Class classToSubclass,
java.lang.Class... interfaces) |
static void |
processMethod(ClassWriter cw,
java.lang.reflect.Method method,
java.lang.String proxyName,
java.lang.String handlerName) |
static void |
setInvocationHandler(java.lang.Object proxy,
java.lang.reflect.InvocationHandler invocationHandler) |
static MethodVisitor |
visit(ClassWriter cw,
java.lang.reflect.Method method,
java.lang.String proxyName,
java.lang.String handlerName) |
public static final java.lang.reflect.InvocationHandler NON_BUSINESS_HANDLER
public static java.lang.Object newProxyInstance(java.lang.ClassLoader classLoader, java.lang.reflect.InvocationHandler handler, java.lang.Class classToSubclass, java.lang.Class... interfaces) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void setInvocationHandler(java.lang.Object proxy, java.lang.reflect.InvocationHandler invocationHandler)
public static java.lang.reflect.InvocationHandler getInvocationHandler(java.lang.Object proxy)
public static java.lang.Object constructProxy(java.lang.Class clazz, java.lang.reflect.InvocationHandler handler) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public static boolean isProxy(java.lang.Class<?> clazz)
public static java.lang.Class createProxy(java.lang.Class<?> classToProxy, java.lang.ClassLoader cl, java.lang.String proxyName, java.lang.Class... interfaces)
public static java.lang.Class createProxy(java.lang.Class<?> classToProxy, java.lang.ClassLoader cl, java.lang.Class... interfaces)
public static byte[] generateProxy(java.lang.Class<?> classToProxy, java.lang.String proxyName, java.lang.Class<?>... interfaces) throws ProxyGenerationException
ProxyGenerationException
public static void processMethod(ClassWriter cw, java.lang.reflect.Method method, java.lang.String proxyName, java.lang.String handlerName) throws ProxyGenerationException
ProxyGenerationException
public static MethodVisitor visit(ClassWriter cw, java.lang.reflect.Method method, java.lang.String proxyName, java.lang.String handlerName) throws ProxyGenerationException
ProxyGenerationException
public static java.lang.String getAsmTypeAsString(java.lang.Class<?> parameterType, boolean wrap)
parameterType
- Class to convertwrap
- True if a non-array object should be wrapped with L and ; - e.g. Ljava/lang/Integer;