Package net.sf.jasperreports.compilers
Class GroovyEvaluator
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JREvaluator
-
- net.sf.jasperreports.compilers.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 java.lang.StringEXCEPTION_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 voidaddFunctionClosureMethods(org.codehaus.groovy.runtime.MethodClosure methodClosure, java.lang.String functionName)protected java.lang.ObjectfunctionCall(java.lang.String methodName, java.lang.Object[] args)protected java.lang.ObjecthandleEvaluationException(JRExpression expression, java.lang.Throwable e)protected voidregisterMethods(groovy.lang.ExpandoMetaClass extendedMetaClass)voidsetJasperReportsContext(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 java.lang.String EXCEPTION_MESSAGE_KEY_FUNCTION_NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
setJasperReportsContext
public void setJasperReportsContext(JasperReportsContext context)
- Specified by:
setJasperReportsContextin interfaceJasperReportsContextAware
-
handleEvaluationException
protected java.lang.Object handleEvaluationException(JRExpression expression, java.lang.Throwable e) throws JRExpressionEvalException
- Overrides:
handleEvaluationExceptionin classJREvaluator- Throws:
JRExpressionEvalException
-
functionCall
protected java.lang.Object functionCall(java.lang.String methodName, java.lang.Object[] args)
-
addFunctionClosureMethods
protected void addFunctionClosureMethods(org.codehaus.groovy.runtime.MethodClosure methodClosure, java.lang.String functionName)
-
registerMethods
protected void registerMethods(groovy.lang.ExpandoMetaClass extendedMetaClass)
-
-