public class ReflectingConfigurationSource extends java.lang.Object implements ConfigurationSource
Constructor and Description |
---|
ReflectingConfigurationSource() |
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(java.lang.String key,
boolean deflt)
Get the value from this configuration source set by the given
key
or deflt if no value exists for that key. |
double |
getDouble(java.lang.String key,
double deflt)
Get the value from this configuration source set by the given
key
or deflt if no value exists for that key. |
int |
getInt(java.lang.String key,
int deflt)
Get the value from this configuration source set by the given
key
or deflt if no value exists for that key. |
long |
getLong(java.lang.String key,
long deflt)
Get the value from this configuration source set by the given
key
or deflt if no value exists for that key. |
java.lang.String |
getString(java.lang.String key,
java.lang.String deflt)
Get the value from this configuration source set by the given
key
or deflt if no value exists for that key. |
java.util.Map<java.lang.String,java.lang.String> |
prefixMatch(java.lang.String prefix)
Get the mapping of property key to (toString()) value for configuration properties
that start with the given prefix.
If null is passed as an argument, all properties are returned. |
java.lang.Object |
unwrapDelegate()
Get the source configuration object.
|
public int getInt(java.lang.String key, int deflt)
ConfigurationSource
key
or deflt
if no value exists for that key.getInt
in interface ConfigurationSource
key
- the property keydeflt
- the default value to return if no value exists for the given keypublic long getLong(java.lang.String key, long deflt)
ConfigurationSource
key
or deflt
if no value exists for that key.getLong
in interface ConfigurationSource
key
- the property keydeflt
- the default value to return if no value exists for the given keypublic boolean getBoolean(java.lang.String key, boolean deflt)
ConfigurationSource
key
or deflt
if no value exists for that key.getBoolean
in interface ConfigurationSource
key
- the property keydeflt
- the default value to return if no value exists for the given keypublic java.lang.String getString(java.lang.String key, java.lang.String deflt)
ConfigurationSource
key
or deflt
if no value exists for that key.getString
in interface ConfigurationSource
key
- the property keydeflt
- the default value to return if no value exists for the given keypublic double getDouble(java.lang.String key, double deflt)
ConfigurationSource
key
or deflt
if no value exists for that key.getDouble
in interface ConfigurationSource
key
- the property keydeflt
- the default value to return if no value exists for the given keypublic java.util.Map<java.lang.String,java.lang.String> prefixMatch(java.lang.String prefix)
ConfigurationSource
null
is passed as an argument, all properties are returned.
To get all splice DDL properties, for example:
Mapprops = config.prefixMatch("splice.ddl*");
prefixMatch
in interface ConfigurationSource
prefix
- the property's starting keyprefix
.public java.lang.Object unwrapDelegate()
ConfigurationSource
unwrapDelegate
in interface ConfigurationSource