Package net.sf.jasperreports.javascript
Class JavaScriptCompilerBase
java.lang.Object
net.sf.jasperreports.engine.design.JRAbstractCompiler
net.sf.jasperreports.javascript.JavaScriptCompilerBase
- All Implemented Interfaces:
- JRCompiler
- Direct Known Subclasses:
- JavaScriptClassCompiler,- JavaScriptCompiler
Base compiler class for reports that use JavaScript as expression language.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classprotected static class
- 
Field SummaryFieldsFields inherited from class net.sf.jasperreports.engine.design.JRAbstractCompilerEXCEPTION_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.JRCompilerCOMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedJavaScriptCompilerBase(JasperReportsContext jasperReportsContext) Creates a JavaScript compiler.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcheckLanguage(String language) Checks that the report language is supported by the compiler.protected JRCompilationSourceCodegenerateSourceCode(JRSourceCompileTask sourceTask) Generates expression evaluator code.protected static StringgetFieldVar(String name) protected static StringgetParameterVar(String name) protected StringgetSourceFileName(String unitName) Returns the name of the source file where generated source code for an unit is saved.protected static StringgetVariableVar(String name) protected JREvaluatorloadEvaluator(Serializable compileData, String unitName) Creates an expression evaluator instance from data saved when the report was compiled.Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompilercompileReport, compileUnits, createCompileData, createEvaluator, directValueFilter, effectiveDirectValueFilter, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
- 
Field Details- 
EXCEPTION_MESSAGE_KEY_INVALID_COMPILE_DATA_TYPE- See Also:
 
 
- 
- 
Constructor Details- 
JavaScriptCompilerBaseCreates a JavaScript compiler.
 
- 
- 
Method Details- 
checkLanguageDescription copied from class:JRAbstractCompilerChecks that the report language is supported by the compiler.- Specified by:
- checkLanguagein class- JRAbstractCompiler
- Parameters:
- language- the report language
- Throws:
- JRException
 
- 
generateSourceCodeprotected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException Description copied from class:JRAbstractCompilerGenerates expression evaluator code.- Specified by:
- generateSourceCodein class- JRAbstractCompiler
- Parameters:
- sourceTask- the source code generation information
- Returns:
- generated expression evaluator code
- Throws:
- JRException
 
- 
getSourceFileNameDescription copied from class:JRAbstractCompilerReturns the name of the source file where generated source code for an unit is saved.If the compiler needs source files for compilation or COMPILER_KEEP_JAVA_FILEis set, the generated source will be saved in a file having the name returned by this method.- Specified by:
- getSourceFileNamein class- JRAbstractCompiler
- Parameters:
- unitName- the unit name
- Returns:
- the source file name
 
- 
loadEvaluatorDescription copied from class:JRAbstractCompilerCreates an expression evaluator instance from data saved when the report was compiled.- Specified by:
- loadEvaluatorin class- JRAbstractCompiler
- Parameters:
- compileData- the data saved when the report was compiled
- unitName- the evaluator unit name
- Returns:
- an expression evaluator instance
- Throws:
- JRException
 
- 
defaultExpressionCreator
- 
oldExpressionCreator
- 
estimatedExpressionCreator
- 
getParameterVar
- 
getVariableVar
- 
getFieldVar
 
-