类 ReflectiveAspectJAdvisorFactory
java.lang.Object
infra.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
infra.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory
- 所有已实现的接口:
AspectJAdvisorFactory,Serializable
public class ReflectiveAspectJAdvisorFactory
extends AbstractAspectJAdvisorFactory
implements Serializable
Factory that can create Framework AOP Advisors given AspectJ classes from
classes honoring AspectJ's annotation syntax, using reflection to invoke the
corresponding advice methods.
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Adrian Colyer, Juergen Hoeller, Ramnivas Laddad, Phillip Webb, Sam Brannen, Harry Yang
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明protected static classSynthetic advisor that instantiates the aspect.从类继承的嵌套类/接口 infra.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
AbstractAspectJAdvisorFactory.AspectJAnnotation, AbstractAspectJAdvisorFactory.AspectJAnnotationType -
字段概要
字段修饰符和类型字段说明private static final Comparator<Method>private static final infra.util.ReflectionUtils.MethodFilterprivate final infra.beans.factory.BeanFactory从类继承的字段 infra.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
IGNORE_AJC_PROPERTY_NAME, logger, parameterNameDiscoverer -
构造器概要
构造器构造器说明Create a newReflectiveAspectJAdvisorFactory.ReflectiveAspectJAdvisorFactory(infra.beans.factory.BeanFactory beanFactory) Create a newReflectiveAspectJAdvisorFactory, propagating the givenBeanFactoryto the createdAspectJExpressionPointcutinstances, for bean pointcut handling as well as consistentClassLoaderresolution. -
方法概要
修饰符和类型方法说明getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectFactory, int declarationOrder, String aspectName) Build a Framework AOP Advice for the given AspectJ advice method.getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrderInAspect, String aspectName) Build a Framework AOP Advisor for the given AspectJ advice method.getAdvisorMethods(Class<?> aspectClass) getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory) Build Framework AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.private AdvisorgetDeclareParentsAdvisor(Field introductionField) Build aDeclareParentsAdvisorfor the given introduction field.private AspectJExpressionPointcutgetPointcut(Method candidateAdviceMethod, Class<?> candidateAspectClass) 从类继承的方法 infra.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
findAspectJAnnotationOnMethod, isAspect, validate
-
字段详细资料
-
adviceMethodFilter
private static final infra.util.ReflectionUtils.MethodFilter adviceMethodFilter -
adviceMethodComparator
-
beanFactory
@Nullable private final infra.beans.factory.BeanFactory beanFactory
-
-
构造器详细资料
-
ReflectiveAspectJAdvisorFactory
public ReflectiveAspectJAdvisorFactory()Create a newReflectiveAspectJAdvisorFactory. -
ReflectiveAspectJAdvisorFactory
public ReflectiveAspectJAdvisorFactory(@Nullable infra.beans.factory.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}- 另请参阅:
-
AspectJExpressionPointcut.setBeanFactory(infra.beans.factory.BeanFactory)ConfigurableBeanFactory.getBeanClassLoader()
-
-
方法详细资料
-
getAdvisors
从接口复制的说明:AspectJAdvisorFactoryBuild Framework 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
-
getAdvisorMethods
-
getDeclareParentsAdvisor
Build aDeclareParentsAdvisorfor the given introduction field.Resulting Advisors will need to be evaluated for targets.
- 参数:
introductionField- the field to introspect- 返回:
- the Advisor instance, or
nullif not an Advisor
-
getAdvisor
@Nullable public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrderInAspect, String aspectName) 从接口复制的说明:AspectJAdvisorFactoryBuild a Framework 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 Framework advice in its own right
-
getPointcut
@Nullable private AspectJExpressionPointcut getPointcut(Method candidateAdviceMethod, Class<?> candidateAspectClass) -
getAdvice
@Nullable public Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut expressionPointcut, MetadataAwareAspectInstanceFactory aspectFactory, int declarationOrder, String aspectName) 从接口复制的说明:AspectJAdvisorFactoryBuild a Framework AOP Advice for the given AspectJ advice method.- 指定者:
getAdvice在接口中AspectJAdvisorFactory- 参数:
candidateAdviceMethod- the candidate advice methodexpressionPointcut- the AspectJ expression pointcutaspectFactory- 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- 另请参阅:
-