public class PropertiesPropertySource extends MapPropertySource
PropertySource
implementation that extracts properties from a
Properties
object.
Note that because a Properties
object is technically an
<Object, Object>
Hashtable
, one may contain
non-String
keys or values. This implementation, however is restricted to
accessing only String
-based keys and values, in the same fashion as
Properties.getProperty(java.lang.String)
and Properties.setProperty(java.lang.String, java.lang.String)
.
PropertySource.ComparisonPropertySource, PropertySource.StubPropertySource
logger, name, source
Modifier | Constructor and Description |
---|---|
protected |
PropertiesPropertySource(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> source) |
|
PropertiesPropertySource(java.lang.String name,
java.util.Properties source) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getPropertyNames()
Return the names of all properties contained by the
source object (never
null ). |
containsProperty, getProperty
public PropertiesPropertySource(java.lang.String name, java.util.Properties source)
protected PropertiesPropertySource(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> source)
public java.lang.String[] getPropertyNames()
EnumerablePropertySource
null
).getPropertyNames
in class MapPropertySource