public class ExpressionProperties
extends java.util.Properties
Modifier and Type | Field and Description |
---|---|
private java.util.Properties[] |
defaults |
private static java.util.regex.Pattern |
EXPRESSION |
Constructor and Description |
---|
ExpressionProperties(java.util.Properties... defaults)
Creates an empty property list with the specified defaults.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProperty(java.lang.String key)
Returns property value with all
${propKey} like references replaced with the value of
the relevant property with recursive resolution. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue) |
java.lang.String |
getRawPropertyValue(java.lang.String key)
Returns raw value of a property without any replacements.
|
private java.lang.String |
replaceProperties(java.lang.String value) |
list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
private static final java.util.regex.Pattern EXPRESSION
private final java.util.Properties[] defaults
public ExpressionProperties(java.util.Properties... defaults)
defaults
- java.util.Propertiespublic java.lang.String getProperty(java.lang.String key)
Returns property value with all ${propKey}
like references replaced with the value of
the relevant property with recursive resolution.
The method returns null
if the property is not found.
getProperty
in class java.util.Properties
key
- the property key.public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
getProperty
in class java.util.Properties
public java.lang.String getRawPropertyValue(java.lang.String key)
key
- property nameprivate java.lang.String replaceProperties(java.lang.String value)