public abstract class AbstractFormulaEvaluator extends Object implements IFormulaEvaluator
IFormulaEvaluator holding the product component generation
or product component and handles the exceptions thrown by the
evaluateInternal(String, Object...) method.
There is no method to set the compiled formula expression because the expressions have to be set
by the IFormulaEvaluatorFactory while creating the evaluator.
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPILED_EXPRESSION_XML_TAG |
| Constructor and Description |
|---|
AbstractFormulaEvaluator(Object object,
Map<String,String> nameToExpressionMap) |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(String formularName,
Object... parameters)
Evaluates a formula that was added through the builder
|
protected abstract Object |
evaluateInternal(String formularName,
Object... parameters)
This method evaluates the formula with the given name and the specified parameters.
|
Map<String,String> |
getNameToExpressionMap()
Returns a defensive copy of the map of expressions/formulas held by this evaluator.
|
Object |
getObject()
Returns the product component generation or product component this is an evaluator for.
|
public static final String COMPILED_EXPRESSION_XML_TAG
public Object getObject()
IFormulaEvaluatorgetObject in interface IFormulaEvaluatorpublic Object evaluate(String formularName, Object... parameters)
evaluate in interface IFormulaEvaluatorformularName - The name of the formula to evaluateparameters - the parameters the formula requires when being evaluatedIllegalArgumentException - if the formula signature is unknownprotected abstract Object evaluateInternal(String formularName, Object... parameters) throws Exception
formularName - name of the formula to evaluateparameters - the parameters to evaluate the formulaExceptionpublic Map<String,String> getNameToExpressionMap()
getNameToExpressionMap in interface IFormulaEvaluatorCopyright © 2021. All rights reserved.