public class VariableResolver extends Object
${variable_name}
.Constructor and Description |
---|
VariableResolver(Map<String,String> entries)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
replace(String string,
boolean strict)
Replaces parameters in the target string.
|
static VariableResolver |
system()
Creates a new instance from environment variables and system properties.
|
String |
toString() |
public VariableResolver(Map<String,String> entries)
entries
- the variable key and its value pairsIllegalArgumentException
- if any parameter is null
public static VariableResolver system()
public String replace(String string, boolean strict)
${variable-name}
.string
- target stringstrict
- false
to keep undefined parameters,
or true
to raise an exceptionIllegalArgumentException
- if undefined parameters exist on strict mode,
or any parameters contain null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.