类 DefaultIntroductionAdvisor

java.lang.Object
cn.taketoday.core.OrderedSupport
cn.taketoday.aop.support.DefaultIntroductionAdvisor
所有已实现的接口:
Advisor, ClassFilter, IntroductionAdvisor, IntroductionInfo, Ordered, Serializable

public class DefaultIntroductionAdvisor extends OrderedSupport implements IntroductionAdvisor, ClassFilter, Ordered, Serializable
Simple IntroductionAdvisor implementation that by default applies to any class.
从以下版本开始:
3.0
作者:
Rod Johnson, Juergen Hoeller, TODAY 2021/2/1 20:33
另请参阅:
  • 构造器详细资料

    • DefaultIntroductionAdvisor

      public DefaultIntroductionAdvisor(Advice advice)
      Create a DefaultIntroductionAdvisor for the given advice.
      参数:
      advice - the Advice to apply (may implement the IntroductionInfo interface)
      另请参阅:
    • DefaultIntroductionAdvisor

      public DefaultIntroductionAdvisor(Advice advice, 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<?> ifc)
      Create a DefaultIntroductionAdvisor for the given advice.
      参数:
      advice - the Advice to apply
      ifc - the interface to introduce
  • 方法详细资料

    • addInterface

      public void addInterface(Class<?> ifc)
      Add the specified interface to the list of interfaces to introduce.
      参数:
      ifc - 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()
      从接口复制的说明: IntroductionAdvisor
      Can the advised interfaces be implemented by the introduction advice? Invoked before adding an IntroductionAdvisor.
      指定者:
      validateInterfaces 在接口中 IntroductionAdvisor
    • 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
      另请参阅:
    • 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 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