Package net.sf.jasperreports.compilers
Class DirectEvaluator
java.lang.Object
net.sf.jasperreports.engine.fill.JREvaluator
net.sf.jasperreports.compilers.DirectEvaluator
- All Implemented Interfaces:
DatasetExpressionEvaluator
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields inherited from class net.sf.jasperreports.engine.fill.JREvaluator
ignoreNPE, PROPERTY_IGNORE_NPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcustomizedInit(Map<String, JRFillParameter> parametersMap, Map<String, JRFillField> fieldsMap, Map<String, JRFillVariable> variablesMap) Initializes the parameters, fields and variables of the evaluator.protected Objectevaluate(int id) Evaluating by id returns null because this evaluator is used for compilation units which have no generated expression evaluator class, so the only expressions which can reach here are expressions which the unit does not implement.protected ObjectevaluateEstimated(int id) Evaluates an expression using estimated variables values.protected ObjectevaluateOld(int id) Evaluates an expression using old fields and variables values.Methods inherited from class net.sf.jasperreports.engine.fill.JREvaluator
evaluate, evaluateEstimated, evaluateOld, getFunctionSupport, handleEvaluationException, handleMissingResource, init, msg, msg, msg, msg, setDirectExpressionEvaluators, str
-
Constructor Details
-
DirectEvaluator
public DirectEvaluator()
-
-
Method Details
-
customizedInit
protected void customizedInit(Map<String, JRFillParameter> parametersMap, Map<String, throws JRExceptionJRFillField> fieldsMap, Map<String, JRFillVariable> variablesMap) Description copied from class:JREvaluatorInitializes the parameters, fields and variables of the evaluator.- Specified by:
customizedInitin classJREvaluator- Parameters:
parametersMap- the parameters indexed by namefieldsMap- the fields indexed by namevariablesMap- the variables indexed by name- Throws:
JRException
-
evaluate
Evaluating by id returns null because this evaluator is used for compilation units which have no generated expression evaluator class, so the only expressions which can reach here are expressions which the unit does not implement. Generated evaluator classes behave the same way, their switch on the expression id leaving the value null for an id which they do not implement.- Specified by:
evaluatein classJREvaluator- Parameters:
id- the expression id- Returns:
- the result of the evaluation
- Throws:
Throwable- See Also:
-
evaluateOld
Description copied from class:JREvaluatorEvaluates an expression using old fields and variables values.- Specified by:
evaluateOldin classJREvaluator- Parameters:
id- the expression id- Returns:
- the result of the evaluation
- Throws:
Throwable- See Also:
-
evaluateEstimated
Description copied from class:JREvaluatorEvaluates an expression using estimated variables values.- Specified by:
evaluateEstimatedin classJREvaluator- Parameters:
id- the expression id- Returns:
- the result of the evaluation
- Throws:
Throwable- See Also:
-