public class MapFactoryBean extends AbstractFactoryBean<Map>
SetFactoryBean
,
ListFactoryBean
logger
Constructor and Description |
---|
MapFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected Map |
createInstance()
Template method that subclasses must override to construct
the object returned by this factory.
|
Class<Map> |
getObjectType()
This abstract method declaration mirrors the method in the FactoryBean
interface, for a consistent offering of abstract template methods.
|
void |
setSourceMap(Map sourceMap)
Set the source Map, typically populated via XML "map" elements.
|
void |
setTargetMapClass(Class targetMapClass)
Set the class to use for the target Map.
|
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
public void setSourceMap(Map sourceMap)
public void setTargetMapClass(Class targetMapClass)
Default is a linked HashMap, keeping the registration order.
LinkedHashMap
public Class<Map> getObjectType()
AbstractFactoryBean
getObjectType
in interface FactoryBean<Map>
getObjectType
in class AbstractFactoryBean<Map>
null
if not known at the time of the callFactoryBean.getObjectType()
protected Map createInstance()
AbstractFactoryBean
Invoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject()
call.
createInstance
in class AbstractFactoryBean<Map>
AbstractFactoryBean.getObject()