public class ListFactoryBean extends AbstractFactoryBean<java.util.List<java.lang.Object>>
SetFactoryBean
,
MapFactoryBean
logger
Constructor and Description |
---|
ListFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.lang.Object> |
createInstance()
Template method that subclasses must override to construct
the object returned by this factory.
|
java.lang.Class<java.util.List> |
getObjectType()
This abstract method declaration mirrors the method in the FactoryBean
interface, for a consistent offering of abstract template methods.
|
void |
setSourceList(java.util.List<?> sourceList)
Set the source List, typically populated via XML "list" elements.
|
void |
setTargetListClass(java.lang.Class<? extends java.util.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(java.util.List<?> sourceList)
public void setTargetListClass(java.lang.Class<? extends java.util.List> targetListClass)
Default is a java.util.ArrayList
.
ArrayList
public java.lang.Class<java.util.List> getObjectType()
AbstractFactoryBean
getObjectType
in interface FactoryBean<java.util.List<java.lang.Object>>
getObjectType
in class AbstractFactoryBean<java.util.List<java.lang.Object>>
null
if not known at the time of the callFactoryBean.getObjectType()
protected java.util.List<java.lang.Object> createInstance()
AbstractFactoryBean
Invoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject()
call.
createInstance
in class AbstractFactoryBean<java.util.List<java.lang.Object>>
AbstractFactoryBean.getObject()