Package org.springframework.aop.support
Class DefaultIntroductionAdvisor
java.lang.Object
org.springframework.aop.support.DefaultIntroductionAdvisor
- All Implemented Interfaces:
- Serializable,- Advisor,- ClassFilter,- IntroductionAdvisor,- IntroductionInfo,- Ordered
public class DefaultIntroductionAdvisor
extends Object
implements IntroductionAdvisor, ClassFilter, Ordered, Serializable
Simple 
IntroductionAdvisor implementation
 that by default applies to any class.- Since:
- 11.11.2003
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.aop.AdvisorEMPTY_ADVICEFields inherited from interface org.springframework.aop.ClassFilterTRUEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultIntroductionAdvisor(Advice advice) Create a DefaultIntroductionAdvisor for the given advice.DefaultIntroductionAdvisor(Advice advice, @Nullable IntroductionInfo introductionInfo) Create a DefaultIntroductionAdvisor for the given advice.DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice, Class<?> ifc) Create a DefaultIntroductionAdvisor for the given advice.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddInterface(Class<?> ifc) Add the specified interface to the list of interfaces to introduce.booleanReturn the advice part of this aspect.Return the filter determining which target classes this introduction should apply to.Class<?>[]Return the additional interfaces introduced by this Advisor or Advice.intgetOrder()Get the order value of this object.inthashCode()booleanShould the pointcut apply to the given interface or target class?voidsetOrder(int order) toString()voidCan the advised interfaces be implemented by the introduction advice? Invoked before adding an IntroductionAdvisor.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.aop.AdvisorisPerInstance
- 
Constructor Details- 
DefaultIntroductionAdvisorCreate a DefaultIntroductionAdvisor for the given advice.- Parameters:
- advice- the Advice to apply (may implement the- IntroductionInfointerface)
- See Also:
 
- 
DefaultIntroductionAdvisorCreate a DefaultIntroductionAdvisor for the given advice.- Parameters:
- advice- the Advice to apply
- introductionInfo- the IntroductionInfo that describes the interface to introduce (may be- null)
 
- 
DefaultIntroductionAdvisorCreate a DefaultIntroductionAdvisor for the given advice.- Parameters:
- advice- the Advice to apply
- ifc- the interface to introduce
 
 
- 
- 
Method Details- 
addInterfaceAdd the specified interface to the list of interfaces to introduce.- Parameters:
- ifc- the interface to introduce
 
- 
getInterfacesDescription copied from interface:IntroductionInfoReturn the additional interfaces introduced by this Advisor or Advice.- Specified by:
- getInterfacesin interface- IntroductionInfo
- Returns:
- the introduced interfaces
 
- 
validateInterfacesDescription copied from interface:IntroductionAdvisorCan the advised interfaces be implemented by the introduction advice? Invoked before adding an IntroductionAdvisor.- Specified by:
- validateInterfacesin interface- IntroductionAdvisor
- Throws:
- IllegalArgumentException- if the advised interfaces can't be implemented by the introduction advice
 
- 
setOrderpublic void setOrder(int order) 
- 
getOrderpublic int getOrder()Description copied from interface:OrderedGet the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startupvalues).Same order values will result in arbitrary sort positions for the affected objects. 
- 
getAdviceDescription copied from interface:AdvisorReturn the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.
- 
getClassFilterDescription copied from interface:IntroductionAdvisorReturn 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. - Specified by:
- getClassFilterin interface- IntroductionAdvisor
- Returns:
- the class filter
 
- 
matchesDescription copied from interface:ClassFilterShould the pointcut apply to the given interface or target class?- Specified by:
- matchesin interface- ClassFilter
- Parameters:
- clazz- the candidate target class
- Returns:
- whether the advice should apply to the given target class
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-