org.springframework.aop.aspectj.annotation

## 类 BeanFactoryAspectInstanceFactory

- java.lang.Object
- - org.springframework.aop.aspectj.annotation.BeanFactoryAspectInstanceFactory

- 所有已实现的接口:
    Serializable, MetadataAwareAspectInstanceFactory, AspectInstanceFactory, org.springframework.core.Ordered
  直接已知子类:
    PrototypeAspectInstanceFactory

      public class BeanFactoryAspectInstanceFactory
      extends Object
      implements MetadataAwareAspectInstanceFactory, Serializable

  `AspectInstanceFactory` implementation backed by a Spring `BeanFactory`.

  Note that this may instantiate multiple times if using a prototype, which probably won't give the semantics you expect. Use a `LazySingletonAspectInstanceFactoryDecorator` to wrap this to ensure only one new aspect comes back.

  从以下版本开始:
    2.0
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    `BeanFactory`, `LazySingletonAspectInstanceFactoryDecorator`, 序列化表格

- - ### 字段概要

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

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### 构造器概要

    构造器
    构造器和说明
    `BeanFactoryAspectInstanceFactory(org.springframework.beans.factory.BeanFactory beanFactory, String name)` Create a BeanFactoryAspectInstanceFactory.
    `BeanFactoryAspectInstanceFactory(org.springframework.beans.factory.BeanFactory beanFactory, String name, Class<?> type)` Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should introspect to create AJType metadata.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `ClassLoader` | `getAspectClassLoader()` Expose the aspect class loader that this factory uses.
    `Object` | `getAspectCreationMutex()` Return the best possible creation mutex for this factory.
    `Object` | `getAspectInstance()` Create an instance of this factory's aspect.
    `AspectMetadata` | `getAspectMetadata()` Return the AspectJ AspectMetadata for this factory's aspect.
    `int` | `getOrder()` Determine the order for this factory's target aspect, either an instance-specific order expressed through implementing the `Ordered` interface (only checked for singleton beans), or an order expressed through the `Order` annotation at the class level.
    `String` | `toString()`

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

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

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

    - #### BeanFactoryAspectInstanceFactory

          public BeanFactoryAspectInstanceFactory(org.springframework.beans.factory.BeanFactory beanFactory,
                                                  String name)

      Create a BeanFactoryAspectInstanceFactory. AspectJ will be called to introspect to create AJType metadata using the type returned for the given bean name from the BeanFactory.
      参数:
        `beanFactory` - BeanFactory to obtain instance(s) from
        `name` - name of the bean

    - #### BeanFactoryAspectInstanceFactory

          public BeanFactoryAspectInstanceFactory(org.springframework.beans.factory.BeanFactory beanFactory,
                                                  String name,
                                                  @Nullable
                                                  Class<?> type)

      Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should introspect to create AJType metadata. Use if the BeanFactory may consider the type to be a subclass (as when using CGLIB), and the information should relate to a superclass.
      参数:
        `beanFactory` - BeanFactory to obtain instance(s) from
        `name` - the name of the bean
        `type` - the type that should be introspected by AspectJ (`null` indicates resolution through `BeanFactory.getType(java.lang.String)` via the bean name)

  - ### 方法详细资料

    - #### getAspectInstance

          public Object getAspectInstance()

      从接口复制的说明: `AspectInstanceFactory`
      Create an instance of this factory's aspect.
      指定者:
        `getAspectInstance` 在接口中 `AspectInstanceFactory`
      返回:
        the aspect instance (never `null`)

    - #### getAspectClassLoader

          @Nullable
          public ClassLoader getAspectClassLoader()

      从接口复制的说明: `AspectInstanceFactory`
      Expose the aspect class loader that this factory uses.
      指定者:
        `getAspectClassLoader` 在接口中 `AspectInstanceFactory`
      返回:
        the aspect class loader (or `null` for the bootstrap loader)
      另请参阅:
        `ClassUtils.getDefaultClassLoader()`

    - #### getAspectMetadata

          public AspectMetadata getAspectMetadata()

      从接口复制的说明: `MetadataAwareAspectInstanceFactory`
      Return the AspectJ AspectMetadata for this factory's aspect.
      指定者:
        `getAspectMetadata` 在接口中 `MetadataAwareAspectInstanceFactory`
      返回:
        the aspect metadata

    - #### getAspectCreationMutex

          @Nullable
          public Object getAspectCreationMutex()

      从接口复制的说明: `MetadataAwareAspectInstanceFactory`
      Return the best possible creation mutex for this factory.
      指定者:
        `getAspectCreationMutex` 在接口中 `MetadataAwareAspectInstanceFactory`
      返回:
        the mutex object (may be `null` for no mutex to use)

    - #### getOrder

          public int getOrder()

      Determine the order for this factory's target aspect, either an instance-specific order expressed through implementing the `Ordered` interface (only checked for singleton beans), or an order expressed through the `Order` annotation at the class level.
      指定者:
        `getOrder` 在接口中 `org.springframework.core.Ordered`
      另请参阅:
        `Ordered`, `Order`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`