| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | FILE_SEPARATOR
File separator value |
| private static final String | FILE_SEPARATOR_ALIAS
File separator alias |
| private static final int | |
| public static final String | NEWLINE
New line string constant |
| private static final int | |
| private static final String | PATH_SEPARATOR
Path separator value |
| private static final String | PATH_SEPARATOR_ALIAS
Path separator alias |
| private static final int | |
| private static final Properties |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the input string with all property references replaced if any. If there are no valid references the input string will be returned.- the string with possible ${} references string)Go through the input string and replace any occurance of ${p} with the System.getProperty(p) value. |
| public static String | Returns: the input string with all property references replaced if any. If there are no valid references the input string will be returned.- the string with possible ${} references string, final Properties - the source for ${x} property ref values, null means use System.getProperty() props)Go through the input string and replace any occurance of ${p} with the props.getProperty(p) value. |
| public static String | |
| private static String | Returns: the resolved key or nullthe key to resolve key, final Properties the properties to use props)Try to resolve a "key" from the provided properties by checking if it is actually a "key1,key2", in which case try first "key1", then "key2". |
| private static String |
| FILE_SEPARATOR | back to summary |
|---|---|
| private static final String FILE_SEPARATOR File separator value | |
| FILE_SEPARATOR_ALIAS | back to summary |
|---|---|
| private static final String FILE_SEPARATOR_ALIAS File separator alias | |
| IN_BRACKET | back to summary |
|---|---|
| private static final int IN_BRACKET | |
| NEWLINE | back to summary |
|---|---|
| public static final String NEWLINE New line string constant | |
| NORMAL | back to summary |
|---|---|
| private static final int NORMAL | |
| PATH_SEPARATOR | back to summary |
|---|---|
| private static final String PATH_SEPARATOR Path separator value | |
| PATH_SEPARATOR_ALIAS | back to summary |
|---|---|
| private static final String PATH_SEPARATOR_ALIAS Path separator alias | |
| SEEN_DOLLAR | back to summary |
|---|---|
| private static final int SEEN_DOLLAR | |
| systemEnvProperties | back to summary |
|---|---|
| private static final Properties systemEnvProperties | |
| StringPropertyReplacer | back to summary |
|---|---|
| public StringPropertyReplacer() | |
| replaceProperties | back to summary |
|---|---|
| public static String replaceProperties(final String string) Go through the input string and replace any occurance of ${p} with the System.getProperty(p) value. If there is no such property p defined, then the ${p} reference will remain unchanged. If the property reference is of the form ${p:v} and there is no such property p, then the default value v will be returned. If the property reference is of the form ${p1,p2} or ${p1,p2:v} then the primary and the secondary properties will be tried in turn, before returning either the unchanged input, or the default value. The property ${/} is replaced with System.getProperty("file.separator") value and the property ${:} is replaced with System.getProperty("path.separator"). | |
| replaceProperties | back to summary |
|---|---|
| public static String replaceProperties(final String string, final Properties props) Go through the input string and replace any occurance of ${p} with the props.getProperty(p) value. If there is no such property p defined, then the ${p} reference will remain unchanged. If the property reference is of the form ${p:v} and there is no such property p, then the default value v will be returned. If the property reference is of the form ${p1,p2} or ${p1,p2:v} then the primary and the secondary properties will be tried in turn, before returning either the unchanged input, or the default value. The property ${/} is replaced with System.getProperty("file.separator") value and the property ${:} is replaced with System.getProperty("path.separator").
| |
| replaceProperties | back to summary |
|---|---|
| public static String replaceProperties(final String string, StringPropertyReplacer. | |
| resolveCompositeKey | back to summary |
|---|---|
| private static String resolveCompositeKey(String key, final Properties props) Try to resolve a "key" from the provided properties by checking if it is actually a "key1,key2", in which case try first "key1", then "key2". If all fails, return null. It also accepts "key1," and ",key2".
| |
| resolveCompositeKey | back to summary |
|---|---|
| private static String resolveCompositeKey(String key, StringPropertyReplacer. | |
| resolve | back to summary |
|---|---|
| public String resolve(String property) | |