public class MapFactoryBean extends AbstractFactoryBean<Map<Object,Object>>
SetFactoryBean
,
ListFactoryBean
logger
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
MapFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected Map<Object,Object> |
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<? extends Map> 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(@Nullable Class<? extends Map> targetMapClass)
Default is a linked HashMap, keeping the registration order.
LinkedHashMap
public Class<Map> getObjectType()
AbstractFactoryBean
getObjectType
in interface FactoryBean<Map<Object,Object>>
getObjectType
in class AbstractFactoryBean<Map<Object,Object>>
null
if not known at the time of the callFactoryBean.getObjectType()
protected Map<Object,Object> createInstance()
AbstractFactoryBean
Invoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject()
call.
createInstance
in class AbstractFactoryBean<Map<Object,Object>>
AbstractFactoryBean.getObject()