public class MacroProperties
extends java.util.Properties
Constructor and Description |
---|
MacroProperties() |
MacroProperties(java.util.Properties props)
This overrides the Properties() constructor to set the props with
the super(props), but also to set the props in the current table
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProperty(java.lang.String arg0) |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Gets the property identified by key, and then parses it for any
macro information and replaces the macros that can be replaced
|
java.lang.String |
getPropertyRaw(java.lang.String key)
Gets the property value without substituting any macro information.
|
static void |
main(java.lang.String[] args) |
java.lang.String |
parsePropertiesInString(java.lang.String string,
boolean failIfMissing)
Parses a string by replacing all occurrences of a property macro with
the resolved value of the property.
|
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
public MacroProperties()
public MacroProperties(java.util.Properties props)
props
- public static void main(java.lang.String[] args)
public java.lang.String getProperty(java.lang.String arg0)
getProperty
in class java.util.Properties
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
getProperty
in class java.util.Properties
key
- defaultValue
- public java.lang.String parsePropertiesInString(java.lang.String string, boolean failIfMissing) throws java.lang.Exception
string
- The string to be parsedfailIfMissing
- if true, then throws an exception if the item is
missing, otherwise, it ignores the fact that it is missingCruiseControlException
- if a property cannot be resolvedjava.lang.Exception
public java.lang.String getPropertyRaw(java.lang.String key)
key
-