public class TaggedStringEvaluator extends Object implements IStringEvaluator
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.| Constructor and Description |
|---|
TaggedStringEvaluator(IStringEvaluator resolver,
boolean escape) |
| Modifier and Type | Method and Description |
|---|---|
static TaggedStringEvaluator |
decorate(IStringEvaluator... resolver)
Create a
TaggedStringEvaluator using all IStringEvaluator
resolver scopes (most significant first). |
Object |
evaluate(String expression,
IArgs args)
Evaluate an
expression according to the syntax used by the
implementor and return the result. |
IStringEvaluator |
getEvaluator() |
boolean |
isEscape() |
boolean |
isSwallowExceptions() |
void |
setEscape(boolean escape) |
void |
setSwallowExceptions(boolean swallowExceptions) |
public TaggedStringEvaluator(IStringEvaluator resolver, boolean escape)
public static TaggedStringEvaluator decorate(IStringEvaluator... resolver)
TaggedStringEvaluator using all IStringEvaluator
resolver scopes (most significant first).resolver - public Object evaluate(String expression, IArgs args) throws EvaluationException
IStringEvaluatorexpression according to the syntax used by the
implementor and return the result.evaluate in interface IStringEvaluatorexpression - The expression to evaluate.EvaluationException - If we encounter a compile or runtime error.public IStringEvaluator getEvaluator()
public boolean isEscape()
public boolean isSwallowExceptions()
public void setEscape(boolean escape)
public void setSwallowExceptions(boolean swallowExceptions)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.