com.bstek.dorado.util.proxy
public abstract class ProxyBeanUtils extends java.lang.Object
Constructor and Description |
---|
ProxyBeanUtils() |
Modifier and Type | Method and Description |
---|---|
static org.aopalliance.intercept.MethodInterceptor[] |
appendMethodInterceptor(org.aopalliance.intercept.MethodInterceptor[] originMethodInterceptors,
org.aopalliance.intercept.MethodInterceptor methodInterceptor)
向一个方法拦截器数组中追加一个拦截器。
|
static org.aopalliance.intercept.MethodInterceptor[] |
appendMethodInterceptors(org.aopalliance.intercept.MethodInterceptor[] originMethodInterceptors,
org.aopalliance.intercept.MethodInterceptor[] methodInterceptors)
向一个方法拦截器数组中追加一组拦截器。
|
static java.lang.Object |
createBean(java.lang.Class<?> cl)
根据给定的Class类型(可以是Interface)创建Bean。
|
static java.lang.Object |
createBean(java.lang.Class<?> cl,
org.aopalliance.intercept.MethodInterceptor methodInterceptor)
根据给定的Class类型和一个方法拦截器创建动态代理。
|
static java.lang.Object |
createBean(java.lang.Class<?> cl,
org.aopalliance.intercept.MethodInterceptor[] methodInterceptors)
根据给定的Class类型和一组方法拦截器创建动态代理。
|
static java.lang.Object |
createBean(java.lang.Class<?> cl,
org.aopalliance.intercept.MethodInterceptor[] methodInterceptors,
java.lang.Class<?>[] argTypes,
java.lang.Object[] args)
根据给定的Class类型、一组方法拦截器、以及构造参数信息创建动态代理。
|
static int |
getDefaultByteCodeProvider() |
static MethodInterceptorDispatcher |
getMethodInterceptorDispatcher(java.lang.Object object) |
static java.lang.Object |
getProxyTarget(java.lang.Object bean) |
static java.lang.Class<?> |
getProxyTargetType(java.lang.Class<?> cl) |
static java.lang.Class<?> |
getProxyTargetType(java.lang.Object bean) |
static boolean |
isProxy(java.lang.Class<?> cl) |
static boolean |
isProxy(java.lang.Object bean) |
static java.lang.Object |
proxyBean(java.lang.Object target,
java.lang.Class<?> cl,
org.aopalliance.intercept.MethodInterceptor[] methodInterceptors,
java.lang.Class<?>[] argTypes,
java.lang.Object[] args)
根据给定的被代理对象和一组方法拦截器创建动态代理。
|
static java.lang.Object |
proxyBean(java.lang.Object target,
org.aopalliance.intercept.MethodInterceptor methodInterceptor)
根据给定的被代理对象和一个方法拦截器创建动态代理。
|
static java.lang.Object |
proxyBean(java.lang.Object target,
org.aopalliance.intercept.MethodInterceptor[] methodInterceptors)
根据给定的被代理对象和一组方法拦截器创建动态代理。
|
static void |
setDefaultByteCodeProvider(int defaultByteCodeProvider) |
public static final int JAVASSIST
public static final int CGLIB
public static int getDefaultByteCodeProvider()
public static void setDefaultByteCodeProvider(int defaultByteCodeProvider)
public static org.aopalliance.intercept.MethodInterceptor[] appendMethodInterceptor(org.aopalliance.intercept.MethodInterceptor[] originMethodInterceptors, org.aopalliance.intercept.MethodInterceptor methodInterceptor)
originMethodInterceptors
- 原方法拦截器数组methodInterceptor
- 要追加的方法拦截器public static org.aopalliance.intercept.MethodInterceptor[] appendMethodInterceptors(org.aopalliance.intercept.MethodInterceptor[] originMethodInterceptors, org.aopalliance.intercept.MethodInterceptor[] methodInterceptors)
originMethodInterceptors
- 原方法拦截器数组methodInterceptors
- 要追加的方法拦截器的数组public static java.lang.Object createBean(java.lang.Class<?> cl) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object createBean(java.lang.Class<?> cl, org.aopalliance.intercept.MethodInterceptor methodInterceptor) throws java.lang.Exception
如果没有指定任何方法拦截器,则会直接创建一个Bean。
java.lang.Exception
public static java.lang.Object createBean(java.lang.Class<?> cl, org.aopalliance.intercept.MethodInterceptor[] methodInterceptors) throws java.lang.Exception
如果没有指定任何方法拦截器,则会直接创建一个Bean。
java.lang.Exception
public static java.lang.Object createBean(java.lang.Class<?> cl, org.aopalliance.intercept.MethodInterceptor[] methodInterceptors, java.lang.Class<?>[] argTypes, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exception
public static boolean isProxy(java.lang.Class<?> cl)
public static boolean isProxy(java.lang.Object bean)
public static java.lang.Class<?> getProxyTargetType(java.lang.Object bean)
public static java.lang.Class<?> getProxyTargetType(java.lang.Class<?> cl)
public static java.lang.Object getProxyTarget(java.lang.Object bean) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object proxyBean(java.lang.Object target, org.aopalliance.intercept.MethodInterceptor methodInterceptor) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object proxyBean(java.lang.Object target, org.aopalliance.intercept.MethodInterceptor[] methodInterceptors) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object proxyBean(java.lang.Object target, java.lang.Class<?> cl, org.aopalliance.intercept.MethodInterceptor[] methodInterceptors, java.lang.Class<?>[] argTypes, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exception
public static MethodInterceptorDispatcher getMethodInterceptorDispatcher(java.lang.Object object)
object
- java.lang.Exception
Copyright © 2001-2011 www.BSTEK.com All Rights Reserved.