public class MapPropertySource extends EnumerablePropertySource<Map<String,Object>>
PropertySource that reads keys and values from a Map object.PropertiesPropertySourcePropertySource.StubPropertySourcelogger, name, source| Constructor and Description |
|---|
MapPropertySource(String name,
Map<String,Object> source) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsProperty(String name)
Return whether this
PropertySource contains a property with the given name. |
Object |
getProperty(String name)
Return the value associated with the given name,
or
null if not found. |
String[] |
getPropertyNames()
Return the names of all properties contained by the
source object (never
null). |
public Object getProperty(String name)
PropertySourcenull if not found.getProperty in class PropertySource<Map<String,Object>>name - the property to findPropertyResolver.getRequiredProperty(String)public boolean containsProperty(String name)
EnumerablePropertySourcePropertySource contains a property with the given name.
This implementation checks for the presence of the given name within the
EnumerablePropertySource.getPropertyNames() array.
containsProperty in class EnumerablePropertySource<Map<String,Object>>name - the name of the property to findpublic String[] getPropertyNames()
EnumerablePropertySourcenull).getPropertyNames in class EnumerablePropertySource<Map<String,Object>>