类 MapPropertySource
java.lang.Object
cn.taketoday.core.env.PropertySource<T>
cn.taketoday.core.env.EnumerablePropertySource<Map<String,Object>>
cn.taketoday.core.env.MapPropertySource
PropertySource that reads keys and values from a Map object.
The underlying map should not contain any null values in order to
comply with getProperty(java.lang.String) and containsProperty(java.lang.String) semantics.- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams, Juergen Hoeller
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.core.env.PropertySource
PropertySource.StubPropertySource -
字段概要
从类继承的字段 cn.taketoday.core.env.PropertySource
name, source -
构造器概要
构造器构造器说明MapPropertySource(String name, Map<String, Object> source) Create a newMapPropertySourcewith the given name andMap. -
方法概要
修饰符和类型方法说明booleancontainsProperty(String name) Return whether thisPropertySourcecontains a property with the given name.getProperty(String name) Return the value associated with the given name, ornullif not found.String[]Return the names of all properties contained by the source object (nevernull).
-
构造器详细资料
-
MapPropertySource
Create a newMapPropertySourcewith the given name andMap.- 参数:
name- the associated namesource- the Map source (withoutnullvalues in order to get consistentgetProperty(java.lang.String)andcontainsProperty(java.lang.String)behavior)
-
-
方法详细资料
-
getProperty
从类复制的说明:PropertySourceReturn the value associated with the given name, ornullif not found.- 指定者:
getProperty在类中PropertySource<Map<String,Object>> - 参数:
name- the property to find- 另请参阅:
-
containsProperty
从类复制的说明:EnumerablePropertySourceReturn whether thisPropertySourcecontains a property with the given name.This implementation checks for the presence of the given name within the
EnumerablePropertySource.getPropertyNames()array.- 覆盖:
containsProperty在类中EnumerablePropertySource<Map<String,Object>> - 参数:
name- the name of the property to find
-
getPropertyNames
从类复制的说明:EnumerablePropertySourceReturn the names of all properties contained by the source object (nevernull).- 指定者:
getPropertyNames在类中EnumerablePropertySource<Map<String,Object>>
-