Package net.sf.jasperreports.groovy
Class GroovyEvaluator
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JREvaluator
-
- net.sf.jasperreports.groovy.GroovyEvaluator
-
- All Implemented Interfaces:
DatasetExpressionEvaluator
,JasperReportsContextAware
- Direct Known Subclasses:
GroovySandboxEvaluator
public abstract class GroovyEvaluator extends JREvaluator implements JasperReportsContextAware
Groovy expression evaluator that compiles expressions at fill time.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
JRGroovyCompiler
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_FUNCTION_NOT_FOUND
-
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 GroovyEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addFunctionClosureMethods(org.codehaus.groovy.runtime.MethodClosure methodClosure, String functionName)
protected Object
functionCall(String methodName, Object[] args)
protected Object
handleEvaluationException(JRExpression expression, Throwable e)
protected void
registerMethods(groovy.lang.ExpandoMetaClass extendedMetaClass)
void
setJasperReportsContext(JasperReportsContext context)
-
Methods inherited from class net.sf.jasperreports.engine.fill.JREvaluator
customizedInit, evaluate, evaluate, evaluateEstimated, evaluateEstimated, evaluateOld, evaluateOld, getFunctionSupport, handleMissingResource, init, msg, msg, msg, msg, setDirectExpressionEvaluators, str
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_FUNCTION_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_FUNCTION_NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
setJasperReportsContext
public void setJasperReportsContext(JasperReportsContext context)
- Specified by:
setJasperReportsContext
in interfaceJasperReportsContextAware
-
handleEvaluationException
protected Object handleEvaluationException(JRExpression expression, Throwable e) throws JRExpressionEvalException
- Overrides:
handleEvaluationException
in classJREvaluator
- Throws:
JRExpressionEvalException
-
addFunctionClosureMethods
protected void addFunctionClosureMethods(org.codehaus.groovy.runtime.MethodClosure methodClosure, String functionName)
-
registerMethods
protected void registerMethods(groovy.lang.ExpandoMetaClass extendedMetaClass)
-
-