类 BeanMethodInterceptorManager
- java.lang.Object
-
- network.nerve.core.core.inteceptor.base.BeanMethodInterceptorManager
-
public class BeanMethodInterceptorManager extends Object
拦截器管理器 Interceptor manager.- 作者:
- Eva Wang
-
-
构造器概要
构造器 构造器 说明 BeanMethodInterceptorManager()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static voidaddBeanMethodInterceptor(Class annotationType, BeanMethodInterceptor interceptor)添加方法拦截器到管理器中 Add a method interceptor to the manager.static ObjectdoInterceptor(Annotation[] annotations, Object object, Method method, Object[] params, net.sf.cglib.proxy.MethodProxy methodProxy)执行一个方法,根据方法的注解组装拦截器链,并放入拦截器链中执行 Implement a method that assembles the interceptor chain according to the method's annotations and puts it into the interceptor chain.
-
-
-
方法详细资料
-
addBeanMethodInterceptor
public static void addBeanMethodInterceptor(Class annotationType, BeanMethodInterceptor interceptor)
添加方法拦截器到管理器中 Add a method interceptor to the manager.- 参数:
annotationType- 注解类型interceptor- 拦截器
-
doInterceptor
public static Object doInterceptor(Annotation[] annotations, Object object, Method method, Object[] params, net.sf.cglib.proxy.MethodProxy methodProxy) throws Throwable
执行一个方法,根据方法的注解组装拦截器链,并放入拦截器链中执行 Implement a method that assembles the interceptor chain according to the method's annotations and puts it into the interceptor chain.- 参数:
annotations- 方法上标注的注解列表/Method annotated list of annotations.object- 方法所属对象/Method ownermethod- 方法定义/Method definitionparams- 方法参数列表/Method parameter listmethodProxy- 方法代理器- 返回:
- 返回拦截的方法的返回值,可以对该值进行处理和替换/Returns the return value of the intercepting method, which can be processed and replaced.
- 抛出:
Throwable- 该方法可能抛出异常,请谨慎处理/This method may throw an exception, handle with care.
-
-