Package net.sf.jasperreports.javascript
Class JavaScriptCompiler
java.lang.Object
net.sf.jasperreports.engine.design.JRAbstractCompiler
net.sf.jasperreports.javascript.JavaScriptCompilerBase
net.sf.jasperreports.javascript.JavaScriptCompiler
- All Implemented Interfaces:
- JRCompiler
Compiler for reports that use JavaScript as expression language.
 
 This implementation produces evaluators that compile expressions at fill time.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class net.sf.jasperreports.javascript.JavaScriptCompilerBaseJavaScriptCompilerBase.Errors, JavaScriptCompilerBase.ScriptExpressionVisitor
- 
Field SummaryFields inherited from class net.sf.jasperreports.javascript.JavaScriptCompilerBaseEXCEPTION_MESSAGE_KEY_INVALID_COMPILE_DATA_TYPEFields 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 SummaryConstructorsConstructorDescriptionJavaScriptCompiler(JasperReportsContext jasperReportsContext) Creates a JavaScript compiler.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcheckLanguage(String language) Checks that the report language is supported by the compiler.protected StringcompileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) Compiles several expression evaluator units.Methods inherited from class net.sf.jasperreports.javascript.JavaScriptCompilerBasedefaultExpressionCreator, estimatedExpressionCreator, generateSourceCode, getFieldVar, getParameterVar, getSourceFileName, getVariableVar, loadEvaluator, oldExpressionCreatorMethods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompilercompileReport, createCompileData, createEvaluator, directValueFilter, effectiveDirectValueFilter, getCompilerClass, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
- 
Constructor Details- 
JavaScriptCompilerCreates a JavaScript compiler.
 
- 
- 
Method Details- 
checkLanguageDescription copied from class:JRAbstractCompilerChecks that the report language is supported by the compiler.- Overrides:
- checkLanguagein class- JavaScriptCompilerBase
- Parameters:
- language- the report language
- Throws:
- JRException
 
- 
compileUnitsprotected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) throws JRException Description copied from class:JRAbstractCompilerCompiles several expression evaluator units.The result of the compilation should be set by calling setCompileDataon all compile units.- Specified by:
- compileUnitsin class- JRAbstractCompiler
- Parameters:
- units- the compilation units
- classpath- the compilation classpath
- tempDirFile- temporary directory
- Returns:
- a string containing compilation errors, or null if the compilation was successfull
- Throws:
- JRException
 
 
-