接口 MethodInterceptor

所有超级接口:
Callback
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface MethodInterceptor extends Callback
General-purpose Enhancer callback which provides for "around advice".
作者:
Juozas Baliuka baliuka@mwm.lt, TODAY
  • 方法概要

    修饰符和类型
    方法
    说明
    intercept(Object obj, Method method, Object[] args, MethodProxy proxy)
    All generated proxied methods call this method instead of the original method.
  • 方法详细资料

    • intercept

      @Nullable Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable
      All generated proxied methods call this method instead of the original method. The original method may either be invoked by normal reflection using the Method object, or by using the MethodProxy (faster).
      参数:
      obj - "this", the enhanced object
      method - intercepted Method
      args - argument array; primitive types are wrapped
      proxy - used to invoke super (non-intercepted method); may be called as many times as needed
      返回:
      any value compatible with the signature of the proxied method. Method returning void will ignore this value.
      抛出:
      Throwable - any exception may be thrown; if so, super method will not be invoked
      另请参阅: