类 ReflectiveAspectJAdvisorFactory
- java.lang.Object
- org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
- org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory
- 所有已实现的接口:
Serializable,AspectJAdvisorFactory
public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFactory implements Serializable
Factory that can create Spring AOP Advisors given AspectJ classes from classes honoring the AspectJ 5 annotation syntax, using reflection to invoke the corresponding advice methods.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Adrian Colyer, Juergen Hoeller, Ramnivas Laddad, Phillip Webb
- 另请参阅:
- 序列化表格
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static classReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisorSynthetic advisor that instantiates the aspect.从类继承的嵌套类/接口 org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
AbstractAspectJAdvisorFactory.AspectJAnnotation<A extends Annotation>, AbstractAspectJAdvisorFactory.AspectJAnnotationType
字段概要
从类继承的字段 org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
logger, parameterNameDiscoverer
构造器概要
构造器 构造器 说明 ReflectiveAspectJAdvisorFactory()Create a newReflectiveAspectJAdvisorFactory.ReflectiveAspectJAdvisorFactory(BeanFactory beanFactory)Create a newReflectiveAspectJAdvisorFactory, propagating the givenBeanFactoryto the createdAspectJExpressionPointcutinstances, for bean pointcut handling as well as consistentClassLoaderresolution.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 AdvicegetAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName)Build a Spring AOP Advice for the given AspectJ advice method.AdvisorgetAdvisor(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.从类继承的方法 org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
findAspectJAnnotationOnMethod, isAspect, validate
构造器详细资料
ReflectiveAspectJAdvisorFactory
public ReflectiveAspectJAdvisorFactory()
Create a newReflectiveAspectJAdvisorFactory.
ReflectiveAspectJAdvisorFactory
public ReflectiveAspectJAdvisorFactory(BeanFactory beanFactory)
Create a newReflectiveAspectJAdvisorFactory, propagating the givenBeanFactoryto the createdAspectJExpressionPointcutinstances, for bean pointcut handling as well as consistentClassLoaderresolution.- 参数:
beanFactory- the BeanFactory to propagate (may benull}- 从以下版本开始:
- 4.3.6
- 另请参阅:
AspectJExpressionPointcut.setBeanFactory(org.springframework.beans.factory.BeanFactory),ConfigurableBeanFactory.getBeanClassLoader()
方法详细资料
getAdvisors
public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)
从接口复制的说明:AspectJAdvisorFactoryBuild Spring AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.- 指定者:
getAdvisors在接口中AspectJAdvisorFactory- 参数:
aspectInstanceFactory- the aspect instance factory (not the aspect instance itself in order to avoid eager instantiation)- 返回:
- a list of advisors for this class
getAdvisor
public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrderInAspect, String aspectName)
从接口复制的说明:AspectJAdvisorFactoryBuild a Spring AOP Advisor for the given AspectJ advice method.- 指定者:
getAdvisor在接口中AspectJAdvisorFactory- 参数:
candidateAdviceMethod- the candidate advice methodaspectInstanceFactory- the aspect instance factorydeclarationOrderInAspect- 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 Spring advice in its own right
getAdvice
public Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, String aspectName)
从接口复制的说明:AspectJAdvisorFactoryBuild a Spring AOP Advice for the given AspectJ advice method.- 指定者:
getAdvice在接口中AspectJAdvisorFactory- 参数:
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 Spring advice in its own right- 另请参阅:
AspectJAroundAdvice,AspectJMethodBeforeAdvice,AspectJAfterAdvice,AspectJAfterReturningAdvice,AspectJAfterThrowingAdvice