Package net.sf.jasperreports.groovy
Class JRGroovyCompiler
java.lang.Object
net.sf.jasperreports.engine.design.JRAbstractCompiler
net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
net.sf.jasperreports.groovy.JRGroovyCompiler
- All Implemented Interfaces:
JRCompiler
Calculator compiler that uses groovy to compile expressions.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net), Peter Severin (peter_p_s@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
EXCEPTION_MESSAGE_KEY_EXPECTED_JAVA_LANGUAGE, EXCEPTION_MESSAGE_KEY_EXPRESSION_CLASS_NOT_LOADED, PROPERTY_EVALUATOR_CLASS_REFERENCE_FIX_ENABLEDFields inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
EXCEPTION_MESSAGE_KEY_CROSSTAB_ID_NOT_FOUND, EXCEPTION_MESSAGE_KEY_DESIGN_COMPILE_ERROR, EXCEPTION_MESSAGE_KEY_LANGUAGE_NOT_SUPPORTED, EXCEPTION_MESSAGE_KEY_REPORT_EXPRESSIONS_COMPILE_ERROR, EXCEPTION_MESSAGE_KEY_TEMP_DIR_NOT_FOUND, jasperReportsContext, reportClassFilterFields inherited from interface net.sf.jasperreports.engine.design.JRCompiler
COMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckLanguage(String language) protected StringcompileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) protected DirectExpressionValueFilterprotected JRCompilationSourceCodegenerateSourceCode(JRSourceCompileTask sourceTask) protected StringgetSourceFileName(String unitName) protected Class<?>protected Class<?>loadClass(String className, CompiledClasses classes) protected JREvaluatorloadEvaluator(Serializable compileData, String className) Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
classCacheKey, getClassFromCache, putClassInCache, toCompiledClassesMethods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
compileReport, createCompileData, createEvaluator, effectiveDirectValueFilter, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
-
Field Details
-
EXCEPTION_MESSAGE_KEY_COMPILING_EXPRESSIONS_CLASS_FILE
- See Also:
-
EXCEPTION_MESSAGE_KEY_TOO_FEW_CLASSES_GENERATED
- See Also:
-
EXCEPTION_MESSAGE_KEY_TOO_MANY_CLASSES_GENERATED
- See Also:
-
EXCEPTION_MESSAGE_KEY_REPORT_NOT_COMPILED_FOR_CLASS_FILTERING
- See Also:
-
-
Constructor Details
-
JRGroovyCompiler
-
-
Method Details
-
directValueFilter
- Overrides:
directValueFilterin classJRAbstractJavaCompiler
-
compileUnits
protected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) throws JRException - Specified by:
compileUnitsin classJRAbstractCompiler- Throws:
JRException
-
checkLanguage
- Specified by:
checkLanguagein classJRAbstractCompiler- Throws:
JRException
-
generateSourceCode
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException - Specified by:
generateSourceCodein classJRAbstractCompiler- Throws:
JRException
-
getSourceFileName
- Specified by:
getSourceFileNamein classJRAbstractCompiler
-
loadClass
- Overrides:
loadClassin classJRAbstractJavaCompiler
-
loadClass
- Overrides:
loadClassin classJRAbstractJavaCompiler
-
loadEvaluator
- Overrides:
loadEvaluatorin classJRAbstractJavaCompiler- Throws:
JRException
-