org.springframework.beans.factory

## 接口 ObjectFactory<T>

- 所有已知子接口:
    ObjectProvider<T>
  函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

      @FunctionalInterface
      public interface ObjectFactory<T>

  Defines a factory which can return an Object instance (possibly shared or independent) when invoked.

  This interface is typically used to encapsulate a generic factory which returns a new instance (prototype) of some target object on each invocation.

  This interface is similar to `FactoryBean`, but implementations of the latter are normally meant to be defined as SPI instances in a `BeanFactory`, while implementations of this class are normally meant to be fed as an API to other beans (through injection). As such, the `getObject()` method has different exception handling behavior.

  从以下版本开始:
    1.0.2
  作者:
    Colin Sampaleanu
  另请参阅:
    `FactoryBean`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `T` | `getObject()` Return an instance (possibly shared or independent) of the object managed by this factory.

- - ### 方法详细资料

    - #### getObject

          T getObject()
               throws BeansException

      Return an instance (possibly shared or independent) of the object managed by this factory.
      返回:
        the resulting instance
      抛出:
        `BeansException` - in case of creation errors