public class JavaScriptCompiledEvaluator extends JREvaluator implements JasperReportsContextAware
JavaScriptClassCompiler.| Modifier and Type | Field and Description |
|---|---|
protected static String |
EXPRESSION_ID_VAR |
EXCEPTION_MESSAGE_KEY_RESOURCE_NOT_FOUND, ignoreNPE, PROPERTY_IGNORE_NPE| Constructor and Description |
|---|
JavaScriptCompiledEvaluator(JasperReportsContext jasperReportsContext,
String unitName,
JavaScriptCompiledData compiledData)
Create a JavaScript expression evaluator.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
customizedInit(Map<String,JRFillParameter> parametersMap,
Map<String,JRFillField> fieldsMap,
Map<String,JRFillVariable> variablesMap)
Initializes the parameters, fields and variables of the evaluator.
|
protected Object |
evaluate(int id)
Evaluates an expression using current fields and variables values.
|
protected Object |
evaluateEstimated(int id)
Evaluates an expression using estimated variables values.
|
protected Object |
evaluateExpression(int expressionIndex) |
protected Object |
evaluateOld(int id)
Evaluates an expression using old fields and variables values.
|
protected JavaScriptCompiledData.ExpressionIndexes |
getExpression(int id) |
protected static JavaScriptClassLoader |
getScriptClassLoader(String unitName) |
void |
setJasperReportsContext(JasperReportsContext context) |
evaluate, evaluateEstimated, evaluateOld, getFunctionSupport, handleEvaluationException, handleMissingResource, init, msg, msg, msg, msg, setDirectExpressionEvaluators, strprotected static final String EXPRESSION_ID_VAR
public JavaScriptCompiledEvaluator(JasperReportsContext jasperReportsContext, String unitName, JavaScriptCompiledData compiledData)
jasperReportsContext - unitName - compiledData - the report compile dataprotected static JavaScriptClassLoader getScriptClassLoader(String unitName)
public void setJasperReportsContext(JasperReportsContext context)
setJasperReportsContext in interface JasperReportsContextAwareprotected void customizedInit(Map<String,JRFillParameter> parametersMap, Map<String,JRFillField> fieldsMap, Map<String,JRFillVariable> variablesMap) throws JRException
JREvaluatorcustomizedInit in class JREvaluatorparametersMap - the parameters indexed by namefieldsMap - the fields indexed by namevariablesMap - the variables indexed by nameJRExceptionprotected Object evaluate(int id) throws Throwable
JREvaluatorevaluate in class JREvaluatorid - the expression idThrowableJRExpression.EVALUATION_DEFAULT,
JRFillVariable.getValue(),
JRFillField.getValue()protected Object evaluateEstimated(int id) throws Throwable
JREvaluatorevaluateEstimated in class JREvaluatorid - the expression idThrowableJRExpression.EVALUATION_ESTIMATED,
JRFillVariable.getEstimatedValue()protected Object evaluateOld(int id) throws Throwable
JREvaluatorevaluateOld in class JREvaluatorid - the expression idThrowableJRExpression.EVALUATION_OLD,
JRFillVariable.getOldValue(),
JRFillField.getOldValue()protected JavaScriptCompiledData.ExpressionIndexes getExpression(int id)
protected Object evaluateExpression(int expressionIndex)
Copyright © 2023 Cloud Software Group, Inc.. All rights reserved.