接口 BeanMethodInterceptor<T>

  • 所有已知实现类:
    PersistConfigInterceptor

    public interface BeanMethodInterceptor<T>
    系统对象管理器中使用的拦截器接口,想要拦截某些方法时,需要定义自己的拦截器,实现该接口 The interceptor interface used in the system object manager, when you want to intercept some methods, you need to define your own interceptor to implement the interface.
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      Object intercept​(T annotation, Object object, Method method, Object[] params, BeanMethodInterceptorChain interceptorChain)
      拦截器拦截某个方法时,使用该方法,在方法中通过逻辑决定是否继续调用拦截的方法,可以在调用之前和之后做一些业务上的操作 When an interceptor intercepts a method, the method is used to logically determine whether the intercepting method is called in the method, and it can do some business operations before and after the call.
    • 方法详细资料

      • intercept

        Object intercept​(T annotation,
                         Object object,
                         Method method,
                         Object[] params,
                         BeanMethodInterceptorChain interceptorChain)
                  throws Throwable
        拦截器拦截某个方法时,使用该方法,在方法中通过逻辑决定是否继续调用拦截的方法,可以在调用之前和之后做一些业务上的操作 When an interceptor intercepts a method, the method is used to logically determine whether the intercepting method is called in the method, and it can do some business operations before and after the call.
        参数:
        annotation - 拦截方法的注解实例/Annotation instances of the intercepting method.
        object - 方法所属对象/Method owner
        method - 方法定义/Method definition
        params - 方法参数列表/Method parameter list
        interceptorChain - 拦截器链
        返回:
        返回拦截的方法的返回值,可以对该值进行处理和替换/Returns the return value of the intercepting method, which can be processed and replaced.
        抛出:
        Throwable - 该方法可能抛出异常,请谨慎处理/This method may throw an exception, handle with care.