|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jasperreports.engine.fill.JREvaluator
public abstract class JREvaluator
Base class for the dynamically generated expression evaluator classes.
| Constructor Summary | |
|---|---|
protected |
JREvaluator()
Default constructor. |
| Method Summary | |
|---|---|
protected abstract void |
customizedInit(Map<String,JRFillParameter> parametersMap,
Map<String,JRFillField> fieldsMap,
Map<String,JRFillVariable> variablesMap)
Initializes the parameters, fields and variables of the evaluator. |
protected abstract Object |
evaluate(int id)
Evaluates an expression using current fields and variables values. |
Object |
evaluate(JRExpression expression)
|
protected abstract Object |
evaluateEstimated(int id)
Evaluates an expression using estimated variables values. |
Object |
evaluateEstimated(JRExpression expression)
|
protected abstract Object |
evaluateOld(int id)
Evaluates an expression using old fields and variables values. |
Object |
evaluateOld(JRExpression expression)
|
protected String |
handleMissingResource(String key,
Exception e)
Handles the case when a resource is missing. |
void |
init(Map<String,JRFillParameter> parametersMap,
Map<String,JRFillField> fieldsMap,
Map<String,JRFillVariable> variablesMap,
WhenResourceMissingTypeEnum resourceMissingType)
Initializes the evaluator by setting the parameter, field and variable objects. |
String |
msg(String pattern,
Object arg0)
Constructs a message using a pattern with one parameter. |
String |
msg(String pattern,
Object[] args)
Constructs a message using a pattern with an Object array parameter. |
String |
msg(String pattern,
Object arg0,
Object arg1)
Constructs a message using a pattern with two parameters. |
String |
msg(String pattern,
Object arg0,
Object arg1,
Object arg2)
Constructs a message using a pattern with three parameters. |
String |
str(String key)
Returns a string for a given key from the resource bundle associated with the evaluator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected JREvaluator()
| Method Detail |
|---|
public void init(Map<String,JRFillParameter> parametersMap,
Map<String,JRFillField> fieldsMap,
Map<String,JRFillVariable> variablesMap,
WhenResourceMissingTypeEnum resourceMissingType)
throws JRException
init in interface DatasetExpressionEvaluatorparametersMap - the parameters indexed by namefieldsMap - the fields indexed by namevariablesMap - the variables indexed by nameresourceMissingType - the resource missing type
JRException
public String msg(String pattern,
Object arg0)
pattern - the message patternarg0 - the message parameter
MessageFormat.format(java.lang.Object[],java.lang.StringBuffer, java.text.FieldPosition)
public String msg(String pattern,
Object arg0,
Object arg1)
pattern - the message patternarg0 - the first message parameterarg1 - the second message parameter
MessageFormat.format(java.lang.Object[],java.lang.StringBuffer, java.text.FieldPosition)
public String msg(String pattern,
Object arg0,
Object arg1,
Object arg2)
pattern - the message patternarg0 - the first message parameterarg1 - the second message parameterarg2 - the third parameter
MessageFormat.format(java.lang.Object[],java.lang.StringBuffer, java.text.FieldPosition)
public String msg(String pattern,
Object[] args)
pattern - the message patternargs - the parameter Object array
MessageFormat.format(java.lang.Object[],java.lang.StringBuffer, java.text.FieldPosition)public String str(String key)
key - the key
ResourceBundle.getString(java.lang.String)
public Object evaluate(JRExpression expression)
throws JRExpressionEvalException
evaluate in interface DatasetExpressionEvaluatorJRExpressionEvalException
public Object evaluateOld(JRExpression expression)
throws JRExpressionEvalException
evaluateOld in interface DatasetExpressionEvaluatorJRExpressionEvalException
public Object evaluateEstimated(JRExpression expression)
throws JRExpressionEvalException
evaluateEstimated in interface DatasetExpressionEvaluatorJRExpressionEvalException
protected String handleMissingResource(String key,
Exception e)
throws JRRuntimeException
key - the resource keye - the exception
JRRuntimeException - when the resource missing handling type is Error
protected abstract void customizedInit(Map<String,JRFillParameter> parametersMap,
Map<String,JRFillField> fieldsMap,
Map<String,JRFillVariable> variablesMap)
throws JRException
parametersMap - the parameters indexed by namefieldsMap - the fields indexed by namevariablesMap - the variables indexed by name
JRException
protected abstract Object evaluate(int id)
throws Throwable
id - the expression id
ThrowableJRExpression.EVALUATION_DEFAULT,
JRFillVariable.getValue(),
JRFillField.getValue()
protected abstract Object evaluateOld(int id)
throws Throwable
id - the expression id
ThrowableJRExpression.EVALUATION_OLD,
JRFillVariable.getOldValue(),
JRFillField.getOldValue()
protected abstract Object evaluateEstimated(int id)
throws Throwable
id - the expression id
ThrowableJRExpression.EVALUATION_ESTIMATED,
JRFillVariable.getEstimatedValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||