org.springframework.aop.support

## 类 DefaultIntroductionAdvisor

- java.lang.Object
- - org.springframework.aop.support.DefaultIntroductionAdvisor

- 所有已实现的接口:
    Serializable, Advisor, ClassFilter, IntroductionAdvisor, IntroductionInfo, org.springframework.core.Ordered

      public class DefaultIntroductionAdvisor
      extends Object
      implements IntroductionAdvisor, ClassFilter, org.springframework.core.Ordered, Serializable

  Simple `IntroductionAdvisor` implementation that by default applies to any class.
  从以下版本开始:
    11.11.2003
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 字段概要

    - ### 从接口继承的字段 org.springframework.aop.Advisor

      `EMPTY_ADVICE`

    - ### 从接口继承的字段 org.springframework.aop.ClassFilter

      `TRUE`

    - ### 从接口继承的字段 org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### 构造器概要

    构造器
    构造器和说明
    `DefaultIntroductionAdvisor(Advice advice)` Create a DefaultIntroductionAdvisor for the given advice.
    `DefaultIntroductionAdvisor(Advice advice, IntroductionInfo introductionInfo)` Create a DefaultIntroductionAdvisor for the given advice.
    `DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice, Class<?> intf)` Create a DefaultIntroductionAdvisor for the given advice.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addInterface(Class<?> intf)` Add the specified interface to the list of interfaces to introduce.
    `boolean` | `equals(Object other)`
    `Advice` | `getAdvice()` Return the advice part of this aspect.
    `ClassFilter` | `getClassFilter()` Return the filter determining which target classes this introduction should apply to.
    `Class<?>[]` | `getInterfaces()` Return the additional interfaces introduced by this Advisor or Advice.
    `int` | `getOrder()`
    `int` | `hashCode()`
    `boolean` | `isPerInstance()` Return whether this advice is associated with a particular instance (for example, creating a mixin) or shared with all instances of the advised class obtained from the same Spring bean factory.
    `boolean` | `matches(Class<?> clazz)` Should the pointcut apply to the given interface or target class?
    `void` | `setOrder(int order)`
    `String` | `toString()`
    `void` | `validateInterfaces()` Can the advised interfaces be implemented by the introduction advice?

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

    - #### DefaultIntroductionAdvisor

          public DefaultIntroductionAdvisor(Advice advice)

      Create a DefaultIntroductionAdvisor for the given advice.
      参数:
        `advice` - the Advice to apply (may implement the `IntroductionInfo` interface)
      另请参阅:
        `addInterface(java.lang.Class<?>)`

    - #### DefaultIntroductionAdvisor

          public DefaultIntroductionAdvisor(Advice advice,
                                            @Nullable
                                            IntroductionInfo introductionInfo)

      Create a DefaultIntroductionAdvisor for the given advice.
      参数:
        `advice` - the Advice to apply
        `introductionInfo` - the IntroductionInfo that describes the interface to introduce (may be `null`)

    - #### DefaultIntroductionAdvisor

          public DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice,
                                            Class<?> intf)

      Create a DefaultIntroductionAdvisor for the given advice.
      参数:
        `advice` - the Advice to apply
        `intf` - the interface to introduce

  - ### 方法详细资料

    - #### addInterface

          public void addInterface(Class<?> intf)

      Add the specified interface to the list of interfaces to introduce.
      参数:
        `intf` - the interface to introduce

    - #### getInterfaces

          public Class<?>[] getInterfaces()

      从接口复制的说明: `IntroductionInfo`
      Return the additional interfaces introduced by this Advisor or Advice.
      指定者:
        `getInterfaces` 在接口中 `IntroductionInfo`
      返回:
        the introduced interfaces

    - #### validateInterfaces

          public void validateInterfaces()
                                  throws IllegalArgumentException

      从接口复制的说明: `IntroductionAdvisor`
      Can the advised interfaces be implemented by the introduction advice? Invoked before adding an IntroductionAdvisor.
      指定者:
        `validateInterfaces` 在接口中 `IntroductionAdvisor`
      抛出:
        `IllegalArgumentException` - if the advised interfaces can't be implemented by the introduction advice

    - #### setOrder

          public void setOrder(int order)

    - #### getOrder

          public int getOrder()

      指定者:
        `getOrder` 在接口中 `org.springframework.core.Ordered`

    - #### getAdvice

          public Advice getAdvice()

      从接口复制的说明: `Advisor`
      Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.
      指定者:
        `getAdvice` 在接口中 `Advisor`
      返回:
        the advice that should apply if the pointcut matches
      另请参阅:
        `MethodInterceptor`, `BeforeAdvice`, `ThrowsAdvice`, `AfterReturningAdvice`

    - #### isPerInstance

          public boolean isPerInstance()

      从接口复制的说明: `Advisor`
      Return whether this advice is associated with a particular instance (for example, creating a mixin) or shared with all instances of the advised class obtained from the same Spring bean factory.

      Note that this method is not currently used by the framework. Typical Advisor implementations always return `true`. Use singleton/prototype bean definitions or appropriate programmatic proxy creation to ensure that Advisors have the correct lifecycle model.

      指定者:
        `isPerInstance` 在接口中 `Advisor`
      返回:
        whether this advice is associated with a particular target instance

    - #### getClassFilter

          public ClassFilter getClassFilter()

      从接口复制的说明: `IntroductionAdvisor`
      Return the filter determining which target classes this introduction should apply to.

      This represents the class part of a pointcut. Note that method matching doesn't make sense to introductions.

      指定者:
        `getClassFilter` 在接口中 `IntroductionAdvisor`
      返回:
        the class filter

    - #### matches

          public boolean matches(Class<?> clazz)

      从接口复制的说明: `ClassFilter`
      Should the pointcut apply to the given interface or target class?
      指定者:
        `matches` 在接口中 `ClassFilter`
      参数:
        `clazz` - the candidate target class
      返回:
        whether the advice should apply to the given target class

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`