接口 AspectJAdvisorFactory
public interface AspectJAdvisorFactory
Interface for factories that can create Framework AOP Advisors from classes
annotated with AspectJ annotation syntax.
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
-
方法概要
修饰符和类型方法说明getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName) Build a Framework AOP Advice for the given AspectJ advice method.getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName) Build a Framework AOP Advisor for the given AspectJ advice method.getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory) Build Framework AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.booleanDetermine whether or not the given class is an aspect, as reported by AspectJ'sAjTypeSystem.voidIs the given class a valid AspectJ aspect class?
-
方法详细资料
-
isAspect
Determine whether or not the given class is an aspect, as reported by AspectJ'sAjTypeSystem.Will simply return
falseif the supposed aspect is invalid (such as an extension of a concrete aspect class). Will return true for some aspects that Framework AOP cannot process, such as those with unsupported instantiation models. Use thevalidate(java.lang.Class<?>)method to handle these cases if necessary.- 参数:
clazz- the supposed annotation-style AspectJ class- 返回:
- whether or not this class is recognized by AspectJ as an aspect class
-
validate
Is the given class a valid AspectJ aspect class?- 参数:
aspectClass- the supposed AspectJ annotation-style class to validate- 抛出:
AopConfigException- if the class is an invalid aspect (which can never be legal)NotAnAtAspectException- if the class is not an aspect at all (which may or may not be legal, depending on the context)
-
getAdvisors
Build Framework AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.- 参数:
aspectInstanceFactory- the aspect instance factory (not the aspect instance itself in order to avoid eager instantiation)- 返回:
- a list of advisors for this class
-
getAdvisor
@Nullable Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName) Build a Framework AOP Advisor for the given AspectJ advice method.- 参数:
candidateAdviceMethod- the candidate advice methodaspectInstanceFactory- the aspect instance factorydeclarationOrder- the declaration order within the aspectaspectName- the name of the aspect- 返回:
nullif the method is not an AspectJ advice method or if it is a pointcut that will be used by other advice but will not create a Framework advice in its own right
-
getAdvice
@Nullable Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName) Build a Framework AOP Advice for the given AspectJ advice method.- 参数:
candidateAdviceMethod- the candidate advice methodexpressionPointcut- the AspectJ expression pointcutaspectInstanceFactory- the aspect instance factorydeclarationOrder- the declaration order within the aspectaspectName- the name of the aspect- 返回:
nullif the method is not an AspectJ advice method or if it is a pointcut that will be used by other advice but will not create a Framework advice in its own right- 另请参阅:
-