public class MapPropertySource extends EnumerablePropertySource<Map<String,Object>>
PropertySource
that reads keys and values from a Map
object.PropertiesPropertySource
PropertySource.StubPropertySource
EMPTY_NAMES_ARRAY, logger
name, source
Constructor and Description |
---|
MapPropertySource(String name,
Map<String,Object> source) |
Modifier and Type | Method and Description |
---|---|
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 ). |
containsProperty
public Object getProperty(String name)
PropertySource
null
if not found.getProperty
in class PropertySource<Map<String,Object>>
name
- the property to findPropertyResolver.getRequiredProperty(String)
public String[] getPropertyNames()
EnumerablePropertySource
null
).getPropertyNames
in class EnumerablePropertySource<Map<String,Object>>