spring-framework / org.springframework.beans.factory.config / MapFactoryBean

MapFactoryBean

open class MapFactoryBean : AbstractFactoryBean<MutableMap<Any, Any>>

Simple factory for shared Map instances. Allows for central setup of Maps via the "map" element in XML bean definitions.

Author
Juergen Hoeller

Since
09.12.2003

See Also
SetFactoryBeanListFactoryBean

Constructors

<init>

MapFactoryBean()

Simple factory for shared Map instances. Allows for central setup of Maps via the "map" element in XML bean definitions.

Functions

getObjectType

open fun getObjectType(): Class<MutableMap<Any?, Any?>>

setSourceMap

open fun setSourceMap(sourceMap: MutableMap<*, *>): Unit

Set the source Map, typically populated via XML "map" elements.

setTargetMapClass

open fun setTargetMapClass(targetMapClass: Class<out MutableMap<Any?, Any?>>): Unit

Set the class to use for the target Map. Can be populated with a fully qualified class name when defined in a Spring application context.

Default is a linked HashMap, keeping the registration order.