|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jasperreports.engine.fill.JREvaluator
net.sf.jasperreports.compilers.JavaScriptEvaluator
public class JavaScriptEvaluator
JavaScript expression evaluator.
| Nested Class Summary | |
|---|---|
static class |
JavaScriptEvaluator.JSField
Field class used in JavaScript expressions. |
static class |
JavaScriptEvaluator.JSParameter
Parameter class used in JavaScript expressions. |
static class |
JavaScriptEvaluator.JSValue
Base JavaScript value class. |
static class |
JavaScriptEvaluator.JSVariable
Variable class used in JavaScript expressions. |
| Constructor Summary | |
|---|---|
JavaScriptEvaluator(JavaScriptCompileData compileData)
Create a JavaScript expression evaluator. |
|
| Method Summary | |
|---|---|
protected static JavaScriptCompileData.Expression |
createJSExpression(JRExpression expression)
|
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(String expression)
|
protected Object |
evaluateExpression(String type,
String expression)
Deprecated. Replaced by evaluateExpression(String). |
protected Object |
evaluateOld(int id)
Evaluates an expression using old fields and variables values. |
protected org.mozilla.javascript.Script |
getCompiledExpression(String expression)
|
protected JavaScriptCompileData.Expression |
getExpression(int id)
|
protected static String |
getFieldVar(String name)
|
protected static String |
getParameterVar(String name)
|
protected Class<?> |
getTypeClass(String type)
Deprecated. To be removed. |
protected static String |
getVariableVar(String name)
|
| Methods inherited from class net.sf.jasperreports.engine.fill.JREvaluator |
|---|
evaluate, evaluateEstimated, evaluateOld, handleMissingResource, init, msg, msg, msg, msg, str |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaScriptEvaluator(JavaScriptCompileData compileData)
compileData - the report compile data| Method Detail |
|---|
protected static JavaScriptCompileData.Expression createJSExpression(JRExpression expression)
protected static String getParameterVar(String name)
protected static String getVariableVar(String name)
protected static String getFieldVar(String name)
protected void customizedInit(Map<String,JRFillParameter> parametersMap,
Map<String,JRFillField> fieldsMap,
Map<String,JRFillVariable> variablesMap)
throws JRException
JREvaluator
customizedInit in class JREvaluatorparametersMap - the parameters indexed by namefieldsMap - the fields indexed by namevariablesMap - the variables indexed by name
JRException
protected Object evaluate(int id)
throws Throwable
JREvaluator
evaluate in class JREvaluatorid - the expression id
ThrowableJRExpression.EVALUATION_DEFAULT,
JRFillVariable.getValue(),
JRFillField.getValue()
protected Object evaluateEstimated(int id)
throws Throwable
JREvaluator
evaluateEstimated in class JREvaluatorid - the expression id
ThrowableJRExpression.EVALUATION_ESTIMATED,
JRFillVariable.getEstimatedValue()
protected Object evaluateOld(int id)
throws Throwable
JREvaluator
evaluateOld in class JREvaluatorid - the expression id
ThrowableJRExpression.EVALUATION_OLD,
JRFillVariable.getOldValue(),
JRFillField.getOldValue()protected JavaScriptCompileData.Expression getExpression(int id)
protected Object evaluateExpression(String type,
String expression)
evaluateExpression(String).
protected Object evaluateExpression(String expression)
protected org.mozilla.javascript.Script getCompiledExpression(String expression)
protected Class<?> getTypeClass(String type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||