|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.formula.AbstractFormulaEvaluator
public abstract class AbstractFormulaEvaluator
An abstract implementation of 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.
| Field Summary | |
|---|---|
static String |
COMPILED_EXPRESSION_XML_TAG
|
| Constructor Summary | |
|---|---|
AbstractFormulaEvaluator(Object object,
Map<String,String> nameToExpressionMap)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPILED_EXPRESSION_XML_TAG
| Constructor Detail |
|---|
public AbstractFormulaEvaluator(Object object,
Map<String,String> nameToExpressionMap)
| Method Detail |
|---|
public Object getObject()
IFormulaEvaluator
getObject in interface IFormulaEvaluator
public Object evaluate(String formularName,
Object... parameters)
evaluate in interface IFormulaEvaluatorformularName - The name of the formula to evaluateparameters - the parameters the formula requires when being evaluated
IllegalArgumentException - if the formula signature is unknown
protected abstract Object evaluateInternal(String formularName,
Object... parameters)
throws Exception
formularName - name of the formula to evaluateparameters - the parameters to evaluate the formula
Exceptionpublic Map<String,String> getNameToExpressionMap()
getNameToExpressionMap in interface IFormulaEvaluator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||