org.springframework.context.weaving

## 类 AspectJWeavingEnabler

- java.lang.Object
- - org.springframework.context.weaving.AspectJWeavingEnabler

- 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, LoadTimeWeaverAware, org.springframework.core.Ordered

      public class AspectJWeavingEnabler
      extends Object
      implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.BeanClassLoaderAware, LoadTimeWeaverAware, org.springframework.core.Ordered

  Post-processor that registers AspectJ's `ClassPreProcessorAgentAdapter` with the Spring application context's default `LoadTimeWeaver`.
  从以下版本开始:
    2.5
  作者:
    Juergen Hoeller, Ramnivas Laddad

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static String` | `ASPECTJ_AOP_XML_RESOURCE`

    - ### 从接口继承的字段 org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### 构造器概要

    构造器
    构造器和说明
    `AspectJWeavingEnabler()`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `static void` | `enableAspectJWeaving(LoadTimeWeaver weaverToUse, ClassLoader beanClassLoader)` Enable AspectJ weaving with the given `LoadTimeWeaver`.
    `int` | `getOrder()`
    `void` | `postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)`
    `void` | `setBeanClassLoader(ClassLoader classLoader)`
    `void` | `setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver)` Set the `LoadTimeWeaver` of this object's containing `ApplicationContext`.

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

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

- - ### 字段详细资料

    - #### ASPECTJ_AOP_XML_RESOURCE

          public static final String ASPECTJ_AOP_XML_RESOURCE

      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### AspectJWeavingEnabler

          public AspectJWeavingEnabler()

  - ### 方法详细资料

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

      指定者:
        `setBeanClassLoader` 在接口中 `org.springframework.beans.factory.BeanClassLoaderAware`

    - #### setLoadTimeWeaver

          public void setLoadTimeWeaver(LoadTimeWeaver loadTimeWeaver)

      从接口复制的说明: `LoadTimeWeaverAware`
      Set the `LoadTimeWeaver` of this object's containing `ApplicationContext`.

      Invoked after the population of normal bean properties but before an initialization callback like `InitializingBean's` `afterPropertiesSet()` or a custom init-method. Invoked after `ApplicationContextAware's` `setApplicationContext(..)`.

      NOTE: This method will only be called if there actually is a `LoadTimeWeaver` available in the application context. If there is none, the method will simply not get invoked, assuming that the implementing object is able to activate its weaving dependency accordingly.

      指定者:
        `setLoadTimeWeaver` 在接口中 `LoadTimeWeaverAware`
      参数:
        `loadTimeWeaver` - the `LoadTimeWeaver` instance (never `null`)
      另请参阅:
        `InitializingBean.afterPropertiesSet()`, `ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)`

    - #### getOrder

          public int getOrder()

      指定者:
        `getOrder` 在接口中 `org.springframework.core.Ordered`

    - #### postProcessBeanFactory

          public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                                      throws org.springframework.beans.BeansException

      指定者:
        `postProcessBeanFactory` 在接口中 `org.springframework.beans.factory.config.BeanFactoryPostProcessor`
      抛出:
        `org.springframework.beans.BeansException`

    - #### enableAspectJWeaving

          public static void enableAspectJWeaving(@Nullable
                                                  LoadTimeWeaver weaverToUse,
                                                  @Nullable
                                                  ClassLoader beanClassLoader)

      Enable AspectJ weaving with the given `LoadTimeWeaver`.
      参数:
        `weaverToUse` - the LoadTimeWeaver to apply to (or `null` for a default weaver)
        `beanClassLoader` - the class loader to create a default weaver for (if necessary)