Public Member Functions | |
VariableString (String source) | |
VariableString (String source, boolean lenient) | |
String | getSource () |
Override String | toString () throws UnresolvableException |
String | toString (Map<?, Object > map) throws UnresolvableException |
String | toString (IResolver map) throws UnresolvableException |
Protected Member Functions | |
String | resolveVariables (IResolver res, String value) throws UnresolvableException |
Protected Attributes | |
boolean | lenient |
String | source |
Invocation of the toString() method will resolve the embedded variables using the Java system properties. By using the toString(Map) method you can specify which dictionary to use.
In both cases, the following holds: If a non-existing (or null-value) variable is encountered, it will either a) be resolved to the empty string, or b) an exception will be thrown. This depends on the boolean flag lenient.
Note: Relationship between alma.acs.commandcenter.util.PreparedString and alma.acs.commandcenter.util.VariableString:
alma.acs.commandcenter.util.PreparedString uses positional parameters to replace placeholders with the elements of a string array. alma.acs.commandcenter.util.VariableString uses named parameters to replace placeholders with values from a map.
|
Constructs an instance with the given source, and a lenient way of dealing with unresolvable variables.
|
|
Constructs an instance with the given source.
|
|
Returns the non-resolved (source) version of this instance.
|
|
Performs the replacement of embedded variable names, recursively. If a non-existing (or null-value) variable is encountered, this will either a) resolve to the empty string, or b) throw an exception, depending on the boolean flag lenient. |
|
Returns a resolved version of this instance, resolving is done using the specified IResolver.
|
|
Returns a resolved version of this instance, resolving is done using the specified map.
|
|
Returns a resolved version of this instance, resolving is done using the Java system properties.
|
|
|
|
|