public class ListFactoryBean extends AbstractFactoryBean<List<Object>>
SetFactoryBean
,
MapFactoryBean
logger
Constructor and Description |
---|
ListFactoryBean() |
Modifier and Type | Method and Description |
---|---|
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.
|
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
public void setSourceList(List<?> sourceList)
public void setTargetListClass(Class<? extends List> targetListClass)
Default is a java.util.ArrayList
.
ArrayList
public Class<List> getObjectType()
AbstractFactoryBean
getObjectType
in interface FactoryBean<List<Object>>
getObjectType
in class AbstractFactoryBean<List<Object>>
null
if not known at the time of the callFactoryBean.getObjectType()
protected List<Object> createInstance()
AbstractFactoryBean
Invoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject()
call.
createInstance
in class AbstractFactoryBean<List<Object>>
AbstractFactoryBean.getObject()