de.intarsys.tools.expression
Class TaggedStringEvaluator
java.lang.Object
de.intarsys.tools.expression.TaggedStringEvaluator
- All Implemented Interfaces:
- IStringEvaluator
public class TaggedStringEvaluator
- extends Object
- implements IStringEvaluator
An IStringEvaluator for string templates. The evaluator handles
strings of the form
[ chars | "${" chars "}" ]*
,
literally copying all chars outside the "${ }" tags and expanding all tagged
content using the supplied IStringEvaluator.
TaggedStringEvaluator
public TaggedStringEvaluator(IStringEvaluator resolver)
TaggedStringEvaluator
public TaggedStringEvaluator(IStringEvaluator resolver,
boolean escape)
evaluate
public Object evaluate(String expression,
IArgs args)
throws EvaluationException
- Description copied from interface:
IStringEvaluator
- Evaluate an
expression according to the syntax used by the
implementor and return the result.
- Specified by:
evaluate in interface IStringEvaluator
- Parameters:
expression - The expression to evaluate.
- Returns:
- The result object.
- Throws:
EvaluationException - If we encounter a compile or runtime error.
getEvaluator
public IStringEvaluator getEvaluator()
isEscape
public boolean isEscape()
isSwallowExceptions
public boolean isSwallowExceptions()
setEscape
public void setEscape(boolean escape)
setSwallowExceptions
public void setSwallowExceptions(boolean swallowExceptions)
Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.