public enum PropertyReplacer extends Enum<PropertyReplacer>
${propertyName} where optional ASCII white space
inside the braces is ignored.
The class is stateless and therefore thread safe.| Modifier and Type | Method and Description |
|---|---|
static String |
replaceTokensWithProperties(String expression)
Replaces tokens of the format
${property} in the given expression with their corresponding
system property values. |
static String |
replaceTokensWithProperties(String expression,
Properties properties)
Replaces tokens of the format
${property} in the given expression with their corresponding
values from the provided Properties object. |
static PropertyReplacer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PropertyReplacer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static PropertyReplacer[] values()
for (PropertyReplacer c : PropertyReplacer.values()) System.out.println(c);
public static PropertyReplacer valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static String replaceTokensWithProperties(String expression) throws IllegalArgumentException
${property} in the given expression with their corresponding
system property values. If a placeholder has no matching property an
IllegalArgumentException is thrown.expression - the input string containing tokens to be replacedIllegalArgumentException - if a token has no matching system propertyNullPointerException - if expression is nullpublic static String replaceTokensWithProperties(String expression, Properties properties) throws IllegalArgumentException
${property} in the given expression with their corresponding
values from the provided Properties object. Unresolved tokens result
in an IllegalArgumentException.expression - the input string containing tokens to be replacedproperties - the property source used for substitutionspropertiesIllegalArgumentException - if a token has no corresponding propertyNullPointerException - if expression or properties is nullCopyright © 2026 Chronicle Software Ltd. All rights reserved.