org.springframework.beans.factory.config

## 类 ListFactoryBean

- java.lang.Object
- - org.springframework.beans.factory.config.AbstractFactoryBean<List<Object>>
  - - org.springframework.beans.factory.config.ListFactoryBean

- 所有已实现的接口:
    Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<List<Object>>, InitializingBean

      public class ListFactoryBean
      extends AbstractFactoryBean<List<Object>>

  Simple factory for shared List instances. Allows for central setup of Lists via the "list" element in XML bean definitions.
  从以下版本开始:
    09.12.2003
  作者:
    Juergen Hoeller
  另请参阅:
    `SetFactoryBean`, `MapFactoryBean`

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.beans.factory.config.AbstractFactoryBean

      `logger`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected List<Object>` | `createInstance()` Template method that subclasses must override to construct the object returned by this factory.
    `Class<List>` | `getObjectType()` This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.
    `void` | `setSourceList(List<?> sourceList)` Set the source List, typically populated via XML "list" elements.
    `void` | `setTargetListClass(Class<? extends List> targetListClass)` Set the class to use for the target List.

    - ### 从类继承的方法 org.springframework.beans.factory.config.AbstractFactoryBean

      `afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton`

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

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

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

    - #### ListFactoryBean

          public ListFactoryBean()

  - ### 方法详细资料

    - #### setSourceList

          public void setSourceList(List<?> sourceList)

      Set the source List, typically populated via XML "list" elements.

    - #### setTargetListClass

          public void setTargetListClass(@Nullable
                                         Class<? extends List> targetListClass)

      Set the class to use for the target List. Can be populated with a fully qualified class name when defined in a Spring application context.

      Default is a `java.util.ArrayList`.

      另请参阅:
        `ArrayList`

    - #### getObjectType

          public Class<List> getObjectType()

      从类复制的说明: `AbstractFactoryBean`
      This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.
      指定者:
        `getObjectType` 在接口中 `FactoryBean<List<Object>>`
      指定者:
        `getObjectType` 在类中 `AbstractFactoryBean<List<Object>>`
      返回:
        the type of object that this FactoryBean creates, or `null` if not known at the time of the call
      另请参阅:
        `FactoryBean.getObjectType()`

    - #### createInstance

          protected List<Object> createInstance()

      从类复制的说明: `AbstractFactoryBean`
      Template method that subclasses must override to construct the object returned by this factory.

      Invoked on initialization of this FactoryBean in case of a singleton; else, on each `AbstractFactoryBean.getObject()` call.

      指定者:
        `createInstance` 在类中 `AbstractFactoryBean<List<Object>>`
      返回:
        the object returned by this factory
      另请参阅:
        `AbstractFactoryBean.getObject()`