public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFactory implements Serializable
Modifier and Type | Class and Description |
---|---|
protected static class |
ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor
Synthetic advisor that instantiates the aspect.
|
AbstractAspectJAdvisorFactory.AspectJAnnotation<A extends Annotation>, AbstractAspectJAdvisorFactory.AspectJAnnotationType
logger, parameterNameDiscoverer
Constructor and Description |
---|
ReflectiveAspectJAdvisorFactory()
Create a new
ReflectiveAspectJAdvisorFactory . |
ReflectiveAspectJAdvisorFactory(BeanFactory beanFactory)
Create a new
ReflectiveAspectJAdvisorFactory , propagating the given
BeanFactory to the created AspectJExpressionPointcut instances,
for bean pointcut handling as well as consistent ClassLoader resolution. |
Modifier and Type | Method and Description |
---|---|
Advice |
getAdvice(Method candidateAdviceMethod,
AspectJExpressionPointcut expressionPointcut,
MetadataAwareAspectInstanceFactory aspectInstanceFactory,
int declarationOrder,
String aspectName)
Build a Spring AOP Advice for the given AspectJ advice method.
|
Advisor |
getAdvisor(Method candidateAdviceMethod,
MetadataAwareAspectInstanceFactory aspectInstanceFactory,
int declarationOrderInAspect,
String aspectName)
Build a Spring AOP Advisor for the given AspectJ advice method.
|
List<Advisor> |
getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)
Build Spring AOP Advisors for all annotated At-AspectJ methods
on the specified aspect instance.
|
findAspectJAnnotationOnMethod, isAspect, validate
public ReflectiveAspectJAdvisorFactory()
ReflectiveAspectJAdvisorFactory
.public ReflectiveAspectJAdvisorFactory(@Nullable BeanFactory beanFactory)
ReflectiveAspectJAdvisorFactory
, propagating the given
BeanFactory
to the created AspectJExpressionPointcut
instances,
for bean pointcut handling as well as consistent ClassLoader
resolution.beanFactory
- the BeanFactory to propagate (may be null
}AspectJExpressionPointcut.setBeanFactory(org.springframework.beans.factory.BeanFactory)
,
ConfigurableBeanFactory.getBeanClassLoader()
public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)
AspectJAdvisorFactory
getAdvisors
in interface AspectJAdvisorFactory
aspectInstanceFactory
- the aspect instance factory
(not the aspect instance itself in order to avoid eager instantiation)@Nullable public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrderInAspect, String aspectName)
AspectJAdvisorFactory
getAdvisor
in interface AspectJAdvisorFactory
candidateAdviceMethod
- the candidate advice methodaspectInstanceFactory
- 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 right@Nullable public Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName)
AspectJAdvisorFactory
getAdvice
in interface AspectJAdvisorFactory
candidateAdviceMethod
- the candidate advice methodexpressionPointcut
- the AspectJ expression pointcutaspectInstanceFactory
- the aspect instance factorydeclarationOrder
- 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