public class JRGroovyCompiler extends JRAbstractJavaCompiler
Modifier and Type | Field and Description |
---|---|
protected static String |
SOURCE_ENCODING |
PROPERTY_EVALUATOR_CLASS_REFERENCE_FIX_ENABLED
jasperReportsContext
COMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR
Constructor and Description |
---|
JRGroovyCompiler()
Deprecated.
Replaced by
JRGroovyCompiler(JasperReportsContext) . |
JRGroovyCompiler(JasperReportsContext jasperReportsContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkLanguage(String language)
Checks that the report language is supported by the compiler.
|
protected String |
compileUnits(JRCompilationUnit[] units,
String classpath,
File tempDirFile)
Compiles several expression evaluator units.
|
protected JRCompilationSourceCode |
generateSourceCode(JRSourceCompileTask sourceTask)
Generates expression evaluator code.
|
protected String |
getSourceFileName(String unitName)
Returns the name of the source file where generated source code for an unit is saved.
|
classCacheKey, getClassFromCache, loadEvaluator, putClassInCache
compileReport, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
protected static final String SOURCE_ENCODING
public JRGroovyCompiler(JasperReportsContext jasperReportsContext)
public JRGroovyCompiler()
JRGroovyCompiler(JasperReportsContext)
.protected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) throws JRException
JRAbstractCompiler
The result of the compilation should be set by calling
setCompileData
on all compile units.
compileUnits
in class JRAbstractCompiler
units
- the compilation unitsclasspath
- the compilation classpathtempDirFile
- temporary directoryJRException
protected void checkLanguage(String language) throws JRException
JRAbstractCompiler
checkLanguage
in class JRAbstractCompiler
language
- the report languageJRException
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException
JRAbstractCompiler
generateSourceCode
in class JRAbstractCompiler
sourceTask
- the source code generation informationJRException
protected String getSourceFileName(String unitName)
JRAbstractCompiler
If the compiler needs source files for compilation
or COMPILER_KEEP_JAVA_FILE
is set, the generated source
will be saved in a file having the name returned by this method.
getSourceFileName
in class JRAbstractCompiler
unitName
- the unit nameCopyright © 2015. All rights reserved.