Package net.sf.jasperreports.javascript
Class JavaScriptCompiledEvaluator
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JREvaluator
-
- net.sf.jasperreports.javascript.JavaScriptCompiledEvaluator
-
- All Implemented Interfaces:
DatasetExpressionEvaluator,JasperReportsContextAware
public class JavaScriptCompiledEvaluator extends JREvaluator implements JasperReportsContextAware
JavaScript expression evaluator that uses Java bytecode compiled byJavaScriptClassCompiler.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringEXPRESSION_ID_VAR-
Fields inherited from class net.sf.jasperreports.engine.fill.JREvaluator
EXCEPTION_MESSAGE_KEY_RESOURCE_NOT_FOUND, ignoreNPE, PROPERTY_IGNORE_NPE
-
-
Constructor Summary
Constructors Constructor Description JavaScriptCompiledEvaluator(JasperReportsContext jasperReportsContext, String unitName, JavaScriptCompiledData compiledData)Create a JavaScript expression evaluator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcustomizedInit(Map<String,JRFillParameter> parametersMap, Map<String,JRFillField> fieldsMap, Map<String,JRFillVariable> variablesMap)protected Objectevaluate(int id)protected ObjectevaluateEstimated(int id)protected ObjectevaluateExpression(int expressionIndex)protected ObjectevaluateOld(int id)protected JavaScriptCompiledData.ExpressionIndexesgetExpression(int id)protected static JavaScriptClassLoadergetScriptClassLoader(String unitName)voidsetJasperReportsContext(JasperReportsContext context)-
Methods inherited from class net.sf.jasperreports.engine.fill.JREvaluator
evaluate, evaluateEstimated, evaluateOld, getFunctionSupport, handleEvaluationException, handleMissingResource, init, msg, msg, msg, msg, setDirectExpressionEvaluators, str
-
-
-
-
Field Detail
-
EXPRESSION_ID_VAR
protected static final String EXPRESSION_ID_VAR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JavaScriptCompiledEvaluator
public JavaScriptCompiledEvaluator(JasperReportsContext jasperReportsContext, String unitName, JavaScriptCompiledData compiledData)
Create a JavaScript expression evaluator.- Parameters:
jasperReportsContext-unitName-compiledData- the report compile data
-
-
Method Detail
-
getScriptClassLoader
protected static JavaScriptClassLoader getScriptClassLoader(String unitName)
-
setJasperReportsContext
public void setJasperReportsContext(JasperReportsContext context)
- Specified by:
setJasperReportsContextin interfaceJasperReportsContextAware
-
customizedInit
protected void customizedInit(Map<String,JRFillParameter> parametersMap, Map<String,JRFillField> fieldsMap, Map<String,JRFillVariable> variablesMap) throws JRException
- Specified by:
customizedInitin classJREvaluator- Throws:
JRException
-
evaluate
protected Object evaluate(int id) throws Throwable
- Specified by:
evaluatein classJREvaluator- Throws:
Throwable
-
evaluateEstimated
protected Object evaluateEstimated(int id) throws Throwable
- Specified by:
evaluateEstimatedin classJREvaluator- Throws:
Throwable
-
evaluateOld
protected Object evaluateOld(int id) throws Throwable
- Specified by:
evaluateOldin classJREvaluator- Throws:
Throwable
-
getExpression
protected JavaScriptCompiledData.ExpressionIndexes getExpression(int id)
-
evaluateExpression
protected Object evaluateExpression(int expressionIndex)
-
-