T - the source type which configuration data is to be retrievedpublic class NullConfigurationHelper<T> extends Object implements ConfigurationHelper<T>
Configuration object is not available.| Constructor and Description |
|---|
NullConfigurationHelper()
Builds a
NullConfigurationHelper. |
NullConfigurationHelper(ConfigurationHelper<T> originalHelper)
Builds a
NullConfigurationHelper with a reference to the original/expected
ConfigurationHelper. |
| Modifier and Type | Method and Description |
|---|---|
ConfigurationMerger<T> |
configurationMerger()
Creates the applicable
ConfigurationMerger object for the type associated with
this ConfigurationHelper. |
Object |
get(String key)
Returns the object associated with the specified
key. |
T |
getBean()
Returns the configuration bean used by this data retriever, typically for manual
handling and/or troubleshooting purposes.
|
Boolean |
getBoolean(String key)
Returns the
Boolean object associated with the specified key. |
Double |
getDouble(String key)
Returns the
Double object associated with the specified key. |
Integer |
getInteger(String key)
Returns the
Integer object associated with the specified key. |
Long |
getLong(String key)
Returns the
Long object associated with the specified key. |
Boolean |
getMandatoryBoolean(String key)
Returns the
Boolean object associated with the specified key, throwing
an exception if not found. |
Double |
getMandatoryDouble(String key)
Returns the
Double object associated with the specified key, throwing
an exception if not found. |
Integer |
getMandatoryInteger(String key)
Returns the
Integer object associated with the specified key, throwing
an exception if not found. |
Long |
getMandatoryLong(String key)
Returns the
Long object associated with the specified key, throwing an
exception if not found. |
String |
getMandatoryString(String key)
Returns the
String object associated with the specified key, throwing
an exception if not found. |
String |
getString(String key)
Returns the
String object associated with the specified key. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancepublic NullConfigurationHelper()
NullConfigurationHelper.public NullConfigurationHelper(ConfigurationHelper<T> originalHelper)
NullConfigurationHelper with a reference to the original/expected
ConfigurationHelper.originalHelper - the initial ConfigurationHelper that should be applied if
the actual bean was availablepublic T getBean()
ConfigurationDataRetrievergetBean in interface ConfigurationDataRetriever<T>null, alwayspublic Object get(String key)
ConfigurationDataRetrieverkey.
Notes:
get in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)null, alwayspublic Boolean getBoolean(String key)
ConfigurationDataRetrieverBoolean object associated with the specified key.getBoolean in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)null, always (not to be interpreted as false)public Integer getInteger(String key)
ConfigurationDataRetrieverInteger object associated with the specified key.getInteger in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPathnull, alwayspublic Long getLong(String key)
ConfigurationDataRetrieverLong object associated with the specified key.getLong in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPathnull, alwayspublic Double getDouble(String key)
ConfigurationDataRetrieverDouble object associated with the specified key.getDouble in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPathnull, alwayspublic String getString(String key)
ConfigurationDataRetrieverString object associated with the specified key.getString in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)null, alwayspublic Boolean getMandatoryBoolean(String key)
ConfigurationDataRetrieverBoolean object associated with the specified key, throwing
an exception if not found.getMandatoryBoolean in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)Boolean value associated with the specified key; never
nullConfigurationException - alwayspublic Integer getMandatoryInteger(String key)
ConfigurationDataRetrieverInteger object associated with the specified key, throwing
an exception if not found.getMandatoryInteger in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)Integer object associated with the specified key; never
nullConfigurationException - alwayspublic Long getMandatoryLong(String key)
ConfigurationDataRetrieverLong object associated with the specified key, throwing an
exception if not found.getMandatoryLong in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)Long object associated with the specified key; never
nullConfigurationException - alwayspublic Double getMandatoryDouble(String key)
ConfigurationDataRetrieverDouble object associated with the specified key, throwing
an exception if not found.getMandatoryDouble in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)Double object associated with the specified key; never
nullConfigurationException - alwayspublic String getMandatoryString(String key)
ConfigurationDataRetrieverString object associated with the specified key, throwing
an exception if not found.getMandatoryString in interface ConfigurationDataRetriever<T>key - the object key (some implementations may also accept a path expression, e.g:
JSONPath)String object associated with the specified key; never
nullConfigurationException - alwayspublic ConfigurationMerger<T> configurationMerger()
ConfigurationHelperConfigurationMerger object for the type associated with
this ConfigurationHelper.configurationMerger in interface ConfigurationHelper<T>ConfigurationMerger instanceUnsupportedOperationException - if no original helper is specified for this
NullConfigurationHelper.Copyright © 2023. All rights reserved.