public interface PropertiesProvider extends Feature
| Modifier and Type | Method and Description |
|---|---|
<T> T |
bindPropertyClass(String section,
Class<T> clazz)
Binds the configuration POJO to the specified section
|
default String |
getProperty(String key)
Returns the value of the property value with given key as
String. |
default <T> T |
getProperty(String key,
Class<T> asClazz)
Returns the value of the property with given key as given type
asClazz. |
<T> T |
getProperty(String key,
Class<T> asClazz,
T defaultValue)
Returns the value of the property with given key as given type
asClazz. |
String |
getProperty(String key,
String defaultValue)
Returns the value of the property with given key as
String. |
default boolean |
hasProperty(String key)
Checks if the property with given key is defined.
|
getFeatureName, isActiveFeature<T> T bindPropertyClass(String section, Class<T> clazz)
T - the type of the POJOsection - the properties sectionclazz - the class of the POJOdefault boolean hasProperty(String key)
key - The key of the propertytrue if the property with key key is defineddefault String getProperty(String key)
String.key - The key of the propertyString value or null if not definedString getProperty(String key, String defaultValue)
String.
Returns the specified default value if key is not existing.key - The key of the propertydefaultValue - The default value if the key is not presentString value or defaultValue if not defineddefault <T> T getProperty(String key, Class<T> asClazz)
asClazz.T - the type of the property valuekey - The key of the propertyasClazz - The type of the property value<T> T getProperty(String key, Class<T> asClazz, T defaultValue)
asClazz.
Returns the specified default value if key is not existing.T - the type of the property valuekey - The key of the propertyasClazz - The type of the property valuedefaultValue - The default value if the key is not presentdefaultValue if not definedCopyright © 2021. All rights reserved.