|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.pax.scanner.common.SystemPropertyUtils
public abstract class SystemPropertyUtils
Helper class for resolving placeholders in texts. Usually applied to file paths.
A text may contain ${...}
placeholders, to be resolved as
system properties: e.g. ${user.dir}
.
PLACEHOLDER_PREFIX
,
PLACEHOLDER_SUFFIX
,
System.getProperty(String)
Field Summary | |
---|---|
static java.lang.String |
PLACEHOLDER_PREFIX
Prefix for system property placeholders: "${" |
static java.lang.String |
PLACEHOLDER_SUFFIX
Suffix for system property placeholders: "}" |
Constructor Summary | |
---|---|
SystemPropertyUtils()
|
Method Summary | |
---|---|
static java.lang.String |
resolvePlaceholders(java.lang.String text)
Resolve ${...} placeholders in the given text, replacing them with corresponding system property values. |
static java.lang.String |
resolvePlaceholders(java.lang.String text,
java.util.Properties properties)
Resolve ${...} placeholders in the given text, replacing them with corresponding property values or system property values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PLACEHOLDER_PREFIX
public static final java.lang.String PLACEHOLDER_SUFFIX
Constructor Detail |
---|
public SystemPropertyUtils()
Method Detail |
---|
public static java.lang.String resolvePlaceholders(java.lang.String text)
text
- the String to resolve
PLACEHOLDER_PREFIX
,
PLACEHOLDER_SUFFIX
public static java.lang.String resolvePlaceholders(java.lang.String text, java.util.Properties properties)
text
- the String to resolveproperties
- properties to be searched beside system properties
PLACEHOLDER_PREFIX
,
PLACEHOLDER_SUFFIX
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |