接口 AdvisorAdapter

所有已知实现类:
AfterReturningAdviceAdapter, MethodBeforeAdviceAdapter, ThrowsAdviceAdapter

public interface AdvisorAdapter
Interface allowing extension to the AOP framework to allow handling of new Advisors and Advice types.

Implementing objects can create AOP Alliance Interceptors from custom advice types, enabling these advice types to be used in the AOP framework, which uses interception under the covers.

There is no need for most users to implement this interface; do so only if you need to introduce more Advisor or Advice types to .

从以下版本开始:
3.0
作者:
Rod Johnson, TODAY 2021/2/1 19:36
  • 方法概要

    修饰符和类型
    方法
    说明
    Return an AOP Alliance MethodInterceptor exposing the behavior of the given advice to an interception-based AOP framework.
    boolean
    Does this adapter understand this advice object?
  • 方法详细资料

    • supportsAdvice

      boolean supportsAdvice(Advice advice)
      Does this adapter understand this advice object? Is it valid to invoke the getInterceptors method with an Advisor that contains this advice as an argument?
      参数:
      advice - an Advice such as a BeforeAdvice
      返回:
      whether this adapter understands the given advice object
      另请参阅:
    • getInterceptor

      MethodInterceptor getInterceptor(Advisor advisor)
      Return an AOP Alliance MethodInterceptor exposing the behavior of the given advice to an interception-based AOP framework.

      Don't worry about any Pointcut contained in the Advisor; the AOP framework will take care of checking the pointcut.

      参数:
      advisor - the Advisor. The supportsAdvice() method must have returned true on this object
      返回:
      an AOP Alliance interceptor for this Advisor. There's no need to cache instances for efficiency, as the AOP framework caches advice chains.