public abstract class JavaScriptCompilerBase extends JRAbstractCompiler
Modifier and Type | Class and Description |
---|---|
protected static class |
JavaScriptCompilerBase.Errors |
protected static class |
JavaScriptCompilerBase.ScriptExpressionVisitor |
Modifier and Type | Field and Description |
---|---|
static String |
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
Modifier | Constructor and Description |
---|---|
protected |
JavaScriptCompilerBase(JasperReportsContext jasperReportsContext)
Creates a JavaScript compiler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkLanguage(String language)
Checks that the report language is supported by the compiler.
|
protected JavaScriptCompilerBase.ScriptExpressionVisitor |
defaultExpressionCreator() |
protected JavaScriptCompilerBase.ScriptExpressionVisitor |
estimatedExpressionCreator() |
protected JRCompilationSourceCode |
generateSourceCode(JRSourceCompileTask sourceTask)
Generates expression evaluator code.
|
protected static String |
getFieldVar(String name) |
protected static String |
getParameterVar(String name) |
protected String |
getSourceFileName(String unitName)
Returns the name of the source file where generated source code for an unit is saved.
|
protected static String |
getVariableVar(String name) |
protected JREvaluator |
loadEvaluator(Serializable compileData,
String unitName)
Creates an expression evaluator instance from data saved when the report was compiled.
|
protected JavaScriptCompilerBase.ScriptExpressionVisitor |
oldExpressionCreator() |
compileReport, compileUnits, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
public static final String EXCEPTION_MESSAGE_KEY_INVALID_COMPILE_DATA_TYPE
protected JavaScriptCompilerBase(JasperReportsContext jasperReportsContext)
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 nameprotected JREvaluator loadEvaluator(Serializable compileData, String unitName) throws JRException
JRAbstractCompiler
loadEvaluator
in class JRAbstractCompiler
compileData
- the data saved when the report was compiledunitName
- the evaluator unit nameJRException
protected JavaScriptCompilerBase.ScriptExpressionVisitor defaultExpressionCreator()
protected JavaScriptCompilerBase.ScriptExpressionVisitor oldExpressionCreator()
protected JavaScriptCompilerBase.ScriptExpressionVisitor estimatedExpressionCreator()
Copyright © 2019 TIBCO Software Inc.. All rights reserved.