程序包 infra.aop
接口 Advisor
- 所有已知实现类:
AbstractBeanFactoryPointcutAdvisor,AbstractGenericPointcutAdvisor,AbstractPointcutAdvisor,AdvisedSupport.AdvisorKeyEntry,AspectJExpressionPointcutAdvisor,AspectJPointcutAdvisor,DeclareParentsAdvisor,DefaultBeanFactoryPointcutAdvisor,DefaultIntroductionAdvisor,DefaultPointcutAdvisor,InstantiationModelAwarePointcutAdvisorImpl,NameMatchMethodPointcutAdvisor,ProxyFactoryBean.PrototypePlaceholderAdvisor,ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor,RegexpMethodPointcutAdvisor,StaticMethodMatcherPointcutAdvisor
public interface Advisor
Base interface holding AOP advice (action to take at a join-point)
and a filter determining the applicability of the advice (such as
a pointcut). This interface is not for use by users, but to
allow for commonality in support for different types of advice.
AOP is based around around advice delivered via method interception, compliant with the AOP Alliance interception API. The Advisor interface allows support for different types of advice, such as before and after advice, which need not be implemented using interception.
- 从以下版本开始:
- 3.0
- 作者:
- Rod Johnson, Juergen Hoeller, TODAY 2021/2/1 18:07
-
字段概要
字段修饰符和类型字段说明static final AdviceCommon placeholder for an emptyAdviceto be returned fromgetAdvice()if no proper advice has been configured (yet). -
方法概要
修饰符和类型方法说明Return the advice part of this aspect.default booleanReturn 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.
-
字段详细资料
-
EMPTY_ADVICE
Common placeholder for an emptyAdviceto be returned fromgetAdvice()if no proper advice has been configured (yet).
-
-
方法详细资料
-
getAdvice
Advice getAdvice()Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.- 返回:
- the advice that should apply if the pointcut matches
- 另请参阅:
-
isPerInstance
default 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 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.- 返回:
- whether this advice is associated with a particular target instance
- 从以下版本开始:
- 4.0
-