public class JRBshCompiler extends JRAbstractCompiler
| Modifier and Type | Field and Description |
|---|---|
static String |
LANGUAGE_BSH
A constant used to specify that the language used by expressions is BeanShell script.
|
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, jasperReportsContextCOMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR| Constructor and Description |
|---|
JRBshCompiler(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.
|
protected JREvaluator |
loadEvaluator(Serializable compileData,
String unitName)
Creates an expression evaluator instance from data saved when the report was compiled.
|
compileReport, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluatorpublic static final String LANGUAGE_BSH
public JRBshCompiler(JasperReportsContext jasperReportsContext)
protected JREvaluator loadEvaluator(Serializable compileData, String unitName) throws JRException
JRAbstractCompilerloadEvaluator in class JRAbstractCompilercompileData - the data saved when the report was compiledunitName - the evaluator unit nameJRExceptionprotected void checkLanguage(String language) throws JRException
JRAbstractCompilercheckLanguage in class JRAbstractCompilerlanguage - the report languageJRExceptionprotected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException
JRAbstractCompilergenerateSourceCode in class JRAbstractCompilersourceTask - the source code generation informationJRExceptionprotected 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 JRAbstractCompilerunits - the compilation unitsclasspath - the compilation classpathtempDirFile - temporary directoryJRExceptionprotected 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 JRAbstractCompilerunitName - the unit nameCopyright © 2017. All rights reserved.