public class

ListFactoryBean

extends AbstractFactoryBean<T>
java.lang.Object
   ↳ org.springframework.beans.factory.config.AbstractFactoryBean<T>
     ↳ org.springframework.beans.factory.config.ListFactoryBean

Class Overview

Simple factory for shared List instances. Allows for central setup of Lists via the "list" element in XML bean definitions.

Summary

[Expand]
Inherited Fields
From class org.springframework.beans.factory.config.AbstractFactoryBean
Public Constructors
ListFactoryBean()
Public Methods
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 targetListClass)
Set the class to use for the target List.
Protected Methods
List createInstance()
Template method that subclasses must override to construct the object returned by this factory.
[Expand]
Inherited Methods
From class org.springframework.beans.factory.config.AbstractFactoryBean
From class java.lang.Object
From interface org.springframework.beans.factory.BeanClassLoaderAware
From interface org.springframework.beans.factory.BeanFactoryAware
From interface org.springframework.beans.factory.DisposableBean
From interface org.springframework.beans.factory.FactoryBean
From interface org.springframework.beans.factory.InitializingBean

Public Constructors

public ListFactoryBean ()

Also: SpringBeans

Public Methods

public Class<List> getObjectType ()

Also: SpringBeans

This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.

Returns
  • the type of object that this FactoryBean creates, or null if not known at the time of the call

public void setSourceList (List sourceList)

Also: SpringBeans

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

public void setTargetListClass (Class targetListClass)

Also: SpringBeans

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.

See Also

Protected Methods

protected List createInstance ()

Also: SpringBeans

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 getObject() call.

Returns
  • the object returned by this factory