public abstract class VariableResolver extends Object implements Translator
Translator that does variable resolution in the Ant style.
This implementation looks for variables in the string like
"${xyz}" or "${abc.DEF.ghi}". The getVariableValue(String) method
is then used to obtain the actual value for the variable.
"$$" works as the escape of "$", so for example "$${abc}" expands to "${abc}" where "${abc}" would have expanded to "value-of-abc". A lone "$" is left as-is, so "$abc" expands to "$abc".
NOOP, SYS_PROP_TR| Constructor and Description |
|---|
VariableResolver() |
public String translate(String str) throws TranslationException
translate in interface TranslatorTranslationExceptionprotected abstract String getVariableValue(String varName) throws TranslationException
TranslationException,
which is an useful technique if the implementation would like to report
additional errors.TranslationExceptionCopyright © 2009-2015 Oracle Corporation. All Rights Reserved.