public class JavaScriptClassCompiler extends JavaScriptCompilerBase
JavaScriptCompiledData
,
JavaScriptCompiledEvaluator
Modifier and Type | Class and Description |
---|---|
protected static class |
JavaScriptClassCompiler.CompileSources |
JavaScriptCompilerBase.Errors, JavaScriptCompilerBase.ScriptExpressionVisitor
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_UNEXPECTED_CLASS_NAME |
static String |
EXCEPTION_MESSAGE_KEY_UNEXPECTED_CLASSES_LENGTH |
static String |
PROPERTY_EXPRESSIONS_PER_SCRIPT
Property that determines the maximum number of report expressions that will be included
in a single generated Java class.
|
static String |
PROPERTY_OPTIMIZATION_LEVEL
Property that determines the optimization level to use when compiling expressions
into Java bytecode.
|
static String |
PROPERTY_SCRIPT_MAX_SIZE
Property that determines the maximum size of a script that will be compiled into
a single Java class.
|
EXCEPTION_MESSAGE_KEY_INVALID_COMPILE_DATA_TYPE
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
COMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR
Constructor and Description |
---|
JavaScriptClassCompiler(JasperReportsContext jasperReportsContext)
Creates a JavaScript compiler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
compileScripts(JRCompilationUnit unit,
org.mozilla.javascript.CompilerEnvirons compilerEnv,
JavaScriptClassCompiler.CompileSources compileSources,
JavaScriptCompiledData compiledData) |
protected String |
compileUnits(JRCompilationUnit[] units,
String classpath,
File tempDirFile)
Compiles several expression evaluator units.
|
checkLanguage, defaultExpressionCreator, estimatedExpressionCreator, generateSourceCode, getFieldVar, getParameterVar, getSourceFileName, getVariableVar, loadEvaluator, oldExpressionCreator
compileReport, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
public static final String PROPERTY_OPTIMIZATION_LEVEL
public static final String PROPERTY_EXPRESSIONS_PER_SCRIPT
public static final String PROPERTY_SCRIPT_MAX_SIZE
public static final String EXCEPTION_MESSAGE_KEY_UNEXPECTED_CLASS_NAME
public static final String EXCEPTION_MESSAGE_KEY_UNEXPECTED_CLASSES_LENGTH
public JavaScriptClassCompiler(JasperReportsContext 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 compileScripts(JRCompilationUnit unit, org.mozilla.javascript.CompilerEnvirons compilerEnv, JavaScriptClassCompiler.CompileSources compileSources, JavaScriptCompiledData compiledData)
Copyright © 2017. All rights reserved.