|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.beans.factory.config.AbstractFactoryBean<Map>
org.springframework.beans.factory.config.MapFactoryBean
public class MapFactoryBean
Simple factory for shared Map instances. Allows for central setup of Maps via the "map" element in XML bean definitions.
SetFactoryBean,
ListFactoryBean| Field Summary |
|---|
| Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
|---|
logger |
| Constructor Summary | |
|---|---|
MapFactoryBean()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
|---|
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapFactoryBean()
| Method Detail |
|---|
public void setSourceMap(Map sourceMap)
public void setTargetMapClass(Class targetMapClass)
Default is a linked HashMap, keeping the registration order.
LinkedHashMappublic 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()
AbstractFactoryBeanInvoked on initialization of this FactoryBean in case of
a singleton; else, on each AbstractFactoryBean.getObject() call.
createInstance in class AbstractFactoryBean<Map>AbstractFactoryBean.getObject()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||