public class ProcessingDecorator extends Object implements IStringEvaluator
IStringEvaluator to add result processing support to an
other embedded IStringEvaluator. The command to be performed is
separated from the expression to be processed by a ":" character.
You can suffix the original expression by as many commands as you like, for example
my ${var:*:dts}
will recursivly expand "var" and apply a conversion to a short time format
afterwards.
Currently we support processing the evaluated result with the following command characters:
| Modifier and Type | Field and Description |
|---|---|
static String |
ARG_SEPARATOR |
static char |
CLOSE_BRACE |
static char |
CODE_CONDITIONAL |
static char |
CODE_DEEPRECURSION |
static char |
CODE_FUNCTOR |
static char |
CODE_REFLECTION |
static char |
CODE_SHALLOWRECURSION |
static char |
OPEN_BRACE |
static char |
PROCESSING_SEPARATOR |
| Constructor and Description |
|---|
ProcessingDecorator(IStringEvaluator evaluator) |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(String expression,
IArgs args)
Evaluate an
expression according to the syntax used by the
implementor and return the result. |
IStringEvaluator |
getEvaluator() |
static IFunctorRegistry |
getFormattingFunctors() |
IStringEvaluator |
getRecursionEvaluator() |
char |
getSeparator() |
String |
getSeparatorString() |
static void |
setFormattingFunctors(IFunctorRegistry formattingFunctors) |
void |
setRecursionEvaluator(IStringEvaluator recursionEvaluator) |
void |
setSeparator(char separator) |
public static final char PROCESSING_SEPARATOR
public static final String ARG_SEPARATOR
public static final char CLOSE_BRACE
public static final char OPEN_BRACE
public static final char CODE_REFLECTION
public static final char CODE_FUNCTOR
public static final char CODE_DEEPRECURSION
public static final char CODE_SHALLOWRECURSION
public static final char CODE_CONDITIONAL
public ProcessingDecorator(IStringEvaluator evaluator)
public static IFunctorRegistry getFormattingFunctors()
public static void setFormattingFunctors(IFunctorRegistry formattingFunctors)
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 IStringEvaluator getRecursionEvaluator()
public char getSeparator()
public String getSeparatorString()
public void setRecursionEvaluator(IStringEvaluator recursionEvaluator)
public void setSeparator(char separator)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.