|
||||||||||
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(java.util.Map parametersMap,
java.util.Map fieldsMap,
java.util.Map variablesMap)
Initializes the parameters, fields and variables of the evaluator. |
protected java.lang.Object |
evaluate(int id)
Evaluates an expression using current fields and variables values. |
protected java.lang.Object |
evaluateEstimated(int id)
Evaluates an expression using estimated variables values. |
protected java.lang.Object |
evaluateExpression(java.lang.String type,
java.lang.String expression)
|
protected java.lang.Object |
evaluateOld(int id)
Evaluates an expression using old fields and variables values. |
protected Script |
getCompiledExpression(java.lang.String expression)
|
protected JavaScriptCompileData.Expression |
getExpression(int id)
|
protected static java.lang.String |
getFieldVar(java.lang.String name)
|
protected static java.lang.String |
getParameterVar(java.lang.String name)
|
protected java.lang.Class |
getTypeClass(java.lang.String type)
|
protected static java.lang.String |
getVariableVar(java.lang.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 dataMethod Detail |
---|
protected static JavaScriptCompileData.Expression createJSExpression(JRExpression expression)
protected static java.lang.String getParameterVar(java.lang.String name)
protected static java.lang.String getVariableVar(java.lang.String name)
protected static java.lang.String getFieldVar(java.lang.String name)
protected void customizedInit(java.util.Map parametersMap, java.util.Map fieldsMap, java.util.Map variablesMap) throws JRException
JREvaluator
customizedInit
in class JREvaluator
parametersMap
- the parameters indexed by namefieldsMap
- the fields indexed by namevariablesMap
- the variables indexed by name
JRException
protected java.lang.Object evaluate(int id) throws java.lang.Throwable
JREvaluator
evaluate
in class JREvaluator
id
- the expression id
java.lang.Throwable
JRExpression.EVALUATION_DEFAULT
,
JRFillVariable.getValue()
,
JRFillField.getValue()
protected java.lang.Object evaluateEstimated(int id) throws java.lang.Throwable
JREvaluator
evaluateEstimated
in class JREvaluator
id
- the expression id
java.lang.Throwable
JRExpression.EVALUATION_ESTIMATED
,
JRFillVariable.getEstimatedValue()
protected java.lang.Object evaluateOld(int id) throws java.lang.Throwable
JREvaluator
evaluateOld
in class JREvaluator
id
- the expression id
java.lang.Throwable
JRExpression.EVALUATION_OLD
,
JRFillVariable.getOldValue()
,
JRFillField.getOldValue()
protected JavaScriptCompileData.Expression getExpression(int id)
protected java.lang.Object evaluateExpression(java.lang.String type, java.lang.String expression)
protected Script getCompiledExpression(java.lang.String expression)
protected java.lang.Class getTypeClass(java.lang.String type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |