org.springframework.beans.factory.config
Class ListFactoryBean


public class ListFactoryBean
implements FactoryBean, InitializingBean

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

Author:
Hans Gilde, Juergen Hoeller
Since: 09.12.2003

Method Summary
 voidafterPropertiesSet()
           
 ObjectgetObject()
           
 ClassgetObjectType()
           
 booleanisSingleton()
           
 voidsetSingleton(boolean singleton)
          Set if a singleton should be created, or a new object on each request else.
 voidsetSourceList(List sourceList)
          Set the source List, typically populated via XML "list" elements.
 voidsetTargetListClass(Class targetListClass)
          Set the class to use for the target List.

Method Detail

afterPropertiesSet

public void afterPropertiesSet()

getObject

public Object getObject()

getObjectType

public Class getObjectType()

isSingleton

public boolean isSingleton()

setSingleton

public void setSingleton(boolean singleton)
Set if a singleton should be created, or a new object on each request else. Default is true.

setSourceList

public void setSourceList(List sourceList)
Set the source List, typically populated via XML "list" elements.

setTargetListClass

public void setTargetListClass(Class targetListClass)
Set the class to use for the target List. Default is java.util.ArrayList.
See Also:
ArrayList

Association Links

to Class java.util.List

to Class java.lang.Class

to Class java.util.List