org.springframework.aop.framework.adapter

## 类 DefaultAdvisorAdapterRegistry

- java.lang.Object
- - org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry

- 所有已实现的接口:
    Serializable, AdvisorAdapterRegistry

      public class DefaultAdvisorAdapterRegistry
      extends Object
      implements AdvisorAdapterRegistry, Serializable

  Default implementation of the `AdvisorAdapterRegistry` interface. Supports `MethodInterceptor`, `MethodBeforeAdvice`, `AfterReturningAdvice`, `ThrowsAdvice`.
  作者:
    Rod Johnson, Rob Harrop, Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `DefaultAdvisorAdapterRegistry()` Create a new DefaultAdvisorAdapterRegistry, registering well-known adapters.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `MethodInterceptor[]` | `getInterceptors(Advisor advisor)` Return an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework.
    `void` | `registerAdvisorAdapter(AdvisorAdapter adapter)` Register the given `AdvisorAdapter`.
    `Advisor` | `wrap(Object adviceObject)` Return an `Advisor` wrapping the given advice.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### DefaultAdvisorAdapterRegistry

          public DefaultAdvisorAdapterRegistry()

      Create a new DefaultAdvisorAdapterRegistry, registering well-known adapters.

  - ### 方法详细资料

    - #### wrap

          public Advisor wrap(Object adviceObject)
                       throws UnknownAdviceTypeException

      从接口复制的说明: `AdvisorAdapterRegistry`
      Return an `Advisor` wrapping the given advice.

      Should by default at least support `MethodInterceptor`, `MethodBeforeAdvice`, `AfterReturningAdvice`, `ThrowsAdvice`.

      指定者:
        `wrap` 在接口中 `AdvisorAdapterRegistry`
      参数:
        `adviceObject` - object that should be an advice
      返回:
        an Advisor wrapping the given advice (never `null`; if the advice parameter is an Advisor, it is to be returned as-is)
      抛出:
        `UnknownAdviceTypeException` - if no registered advisor adapter can wrap the supposed advice

    - #### getInterceptors

          public MethodInterceptor[] getInterceptors(Advisor advisor)
                                              throws UnknownAdviceTypeException

      从接口复制的说明: `AdvisorAdapterRegistry`
      Return an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework.

      Don't worry about the pointcut associated with the `Advisor`, if it is a `PointcutAdvisor`: just return an interceptor.

      指定者:
        `getInterceptors` 在接口中 `AdvisorAdapterRegistry`
      参数:
        `advisor` - Advisor to find an interceptor for
      返回:
        an array of MethodInterceptors to expose this Advisor's behavior
      抛出:
        `UnknownAdviceTypeException` - if the Advisor type is not understood by any registered AdvisorAdapter

    - #### registerAdvisorAdapter

          public void registerAdvisorAdapter(AdvisorAdapter adapter)

      从接口复制的说明: `AdvisorAdapterRegistry`
      Register the given `AdvisorAdapter`. Note that it is not necessary to register adapters for an AOP Alliance Interceptors or Spring Advices: these must be automatically recognized by an `AdvisorAdapterRegistry` implementation.
      指定者:
        `registerAdvisorAdapter` 在接口中 `AdvisorAdapterRegistry`
      参数:
        `adapter` - AdvisorAdapter that understands particular Advisor or Advice types