public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFactory
Modifier and Type | Class and Description |
---|---|
protected static class |
ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor
Synthetic advisor that instantiates the aspect.
|
AbstractAspectJAdvisorFactory.AspectJAnnotation<A extends java.lang.annotation.Annotation>, AbstractAspectJAdvisorFactory.AspectJAnnotationType
ASPECTJ_ANNOTATION_PARAMETER_NAME_DISCOVERER, logger, parameterNameDiscoverer
Constructor and Description |
---|
ReflectiveAspectJAdvisorFactory() |
Modifier and Type | Method and Description |
---|---|
Advice |
getAdvice(java.lang.reflect.Method candidateAdviceMethod,
AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif,
int declarationOrderInAspect,
java.lang.String aspectName)
Build a Spring AOP Advice for the given AspectJ advice method.
|
Advisor |
getAdvisor(java.lang.reflect.Method candidateAdviceMethod,
MetadataAwareAspectInstanceFactory aif,
int declarationOrderInAspect,
java.lang.String aspectName)
Build a Spring AOP Advisor for the given AspectJ advice method.
|
java.util.List<Advisor> |
getAdvisors(MetadataAwareAspectInstanceFactory maaif)
Build Spring AOP Advisors for all annotated At-AspectJ methods
on the specified aspect instance.
|
private Advisor |
getDeclareParentsAdvisor(java.lang.reflect.Field introductionField)
Build a
DeclareParentsAdvisor
for the given introduction field. |
private AspectJExpressionPointcut |
getPointcut(java.lang.reflect.Method candidateAdviceMethod,
java.lang.Class<?> candidateAspectClass) |
createPointcutExpression, findAspectJAnnotationOnMethod, isAspect, validate
public java.util.List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory maaif)
AspectJAdvisorFactory
maaif
- the aspect instance factory (not the aspect instance itself
in order to avoid eager instantiation)private Advisor getDeclareParentsAdvisor(java.lang.reflect.Field introductionField)
DeclareParentsAdvisor
for the given introduction field.
Resulting Advisors will need to be evaluated for targets.
introductionField
- the field to introspectnull
if not an Advisorpublic Advisor getAdvisor(java.lang.reflect.Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, java.lang.String aspectName)
AspectJAdvisorFactory
candidateAdviceMethod
- the candidate advice methodaif
- the aspect instance factorydeclarationOrderInAspect
- the declaration order within the aspectaspectName
- the name of the aspectnull
if 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 Spring advice in its own rightprivate AspectJExpressionPointcut getPointcut(java.lang.reflect.Method candidateAdviceMethod, java.lang.Class<?> candidateAspectClass)
public Advice getAdvice(java.lang.reflect.Method candidateAdviceMethod, AspectJExpressionPointcut ajexp, MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, java.lang.String aspectName)
AspectJAdvisorFactory
candidateAdviceMethod
- the candidate advice methodajexp
- the corresponding AspectJ expression pointcutaif
- the aspect instance factorydeclarationOrderInAspect
- the declaration order within the aspectaspectName
- the name of the aspectnull
if 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 Spring advice in its own rightAspectJAroundAdvice
,
AspectJMethodBeforeAdvice
,
AspectJAfterAdvice
,
AspectJAfterReturningAdvice
,
AspectJAfterThrowingAdvice