org.springframework.aop.aspectj.annotation

## 类 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 class` | `ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor` Synthetic 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 new `ReflectiveAspectJAdvisorFactory`.
    `ReflectiveAspectJAdvisorFactory(org.springframework.beans.factory.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.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `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.

    - ### 从类继承的方法 org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory

      `findAspectJAnnotationOnMethod, isAspect, validate`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### ReflectiveAspectJAdvisorFactory

          public ReflectiveAspectJAdvisorFactory()

      Create a new `ReflectiveAspectJAdvisorFactory`.

    - #### ReflectiveAspectJAdvisorFactory

          public ReflectiveAspectJAdvisorFactory(@Nullable
                                                 org.springframework.beans.factory.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.
      参数:
        `beanFactory` - the BeanFactory to propagate (may be `null`}
      从以下版本开始:
        4.3.6
      另请参阅:
        `AspectJExpressionPointcut.setBeanFactory(org.springframework.beans.factory.BeanFactory)`, `ConfigurableBeanFactory.getBeanClassLoader()`

  - ### 方法详细资料

    - #### getAdvisors

          public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)

      从接口复制的说明: `AspectJAdvisorFactory`
      Build 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

          @Nullable
          public Advisor getAdvisor(Method candidateAdviceMethod,
                                               MetadataAwareAspectInstanceFactory aspectInstanceFactory,
                                               int declarationOrderInAspect,
                                               String aspectName)

      从接口复制的说明: `AspectJAdvisorFactory`
      Build a Spring AOP Advisor for the given AspectJ advice method.
      指定者:
        `getAdvisor` 在接口中 `AspectJAdvisorFactory`
      参数:
        `candidateAdviceMethod` - the candidate advice method
        `aspectInstanceFactory` - the aspect instance factory
        `declarationOrderInAspect` - the declaration order within the aspect
        `aspectName` - the name of the aspect
      返回:
        `null` 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

    - #### getAdvice

          @Nullable
          public Advice getAdvice(Method candidateAdviceMethod,
                                             AspectJExpressionPointcut expressionPointcut,
                                             MetadataAwareAspectInstanceFactory aspectInstanceFactory,
                                             int declarationOrder,
                                             String aspectName)

      从接口复制的说明: `AspectJAdvisorFactory`
      Build a Spring AOP Advice for the given AspectJ advice method.
      指定者:
        `getAdvice` 在接口中 `AspectJAdvisorFactory`
      参数:
        `candidateAdviceMethod` - the candidate advice method
        `expressionPointcut` - the AspectJ expression pointcut
        `aspectInstanceFactory` - the aspect instance factory
        `declarationOrder` - the declaration order within the aspect
        `aspectName` - the name of the aspect
      返回:
        `null` 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
      另请参阅:
        `AspectJAroundAdvice`, `AspectJMethodBeforeAdvice`, `AspectJAfterAdvice`, `AspectJAfterReturningAdvice`, `AspectJAfterThrowingAdvice`