| java.lang.Object net.sf.jasperreports.engine.design.JRAbstractCompiler
All known Subclasses: net.sf.jasperreports.compilers.JRBshCompiler, net.sf.jasperreports.engine.design.JRAbstractJavaCompiler,
JRAbstractCompiler | abstract public class JRAbstractCompiler implements JRCompiler(Code) | | Base class for report compilers.
author: Lucian Chirita (lucianc@users.sourceforge.net) version: $Id: JRAbstractCompiler.java 1625 2007-03-09 17:21:31Z lucianc $ |
Method Summary | |
abstract protected void | checkLanguage(String language) Checks that the report language is supported by the compiler. | final public JasperReport | compileReport(JasperDesign jasperDesign) | abstract protected String | compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) Compiles several expression evaluator units. | abstract protected JRCompilationSourceCode | generateSourceCode(JRSourceCompileTask sourceTask) Generates expression evaluator code. | protected String | getCompilerClass() | abstract protected String | getSourceFileName(String unitName) Returns the name of the source file where generated source code for an unit is saved. | public static String | getUnitName(JasperReport report, JRDataset dataset) Returns the name of the expression evaluator unit for a dataset of a report. | protected static String | getUnitName(JRReport report, JRDataset dataset, String nameSuffix) | public static String | getUnitName(JasperReport report, JRCrosstab crosstab) Returns the name of the expression evaluator unit for a crosstab of a report. | protected static String | getUnitName(JRReport report, JRCrosstab crosstab, JRExpressionCollector expressionCollector, String nameSuffix) | protected static String | getUnitName(JRReport report, int crosstabId, String nameSuffix) | public JREvaluator | loadEvaluator(JasperReport jasperReport) | public JREvaluator | loadEvaluator(JasperReport jasperReport, JRDataset dataset) | public JREvaluator | loadEvaluator(JasperReport jasperReport, JRCrosstab crosstab) | abstract protected JREvaluator | loadEvaluator(Serializable compileData, String unitName) Creates an expression evaluator instance from data saved when the report was compiled. |
JRAbstractCompiler | protected JRAbstractCompiler(boolean needsSourceFiles)(Code) | | Constructor.
Parameters: needsSourceFiles - whether the compiler needs source files or is able to do in memory compilationIf true, the generated code is saved in source files to be used by the compiler. |
checkLanguage | abstract protected void checkLanguage(String language) throws JRException(Code) | | Checks that the report language is supported by the compiler.
Parameters: language - the report language throws: JRException - |
compileUnits | abstract protected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) throws JRException(Code) | | Compiles several expression evaluator units.
The result of the compilation should be set by calling
JRCompilationUnit.setCompileData(Serializable) setCompileData on all compile units.
Parameters: units - the compilation units Parameters: classpath - the compilation classpath Parameters: tempDirFile - temporary directory a string containing compilation errors, or null if the compilation was successfull throws: JRException - |
getSourceFileName | abstract protected String getSourceFileName(String unitName)(Code) | | Returns the name of the source file where generated source code for an unit is saved.
If the compiler needs source files for compilation
or
JRProperties.COMPILER_KEEP_JAVA_FILE COMPILER_KEEP_JAVA_FILE is set, the generated source
will be saved in a file having the name returned by this method.
Parameters: unitName - the unit name the source file name |
getUnitName | public static String getUnitName(JasperReport report, JRDataset dataset)(Code) | | Returns the name of the expression evaluator unit for a dataset of a report.
Parameters: report - the report Parameters: dataset - the dataset the generated expression evaluator unit name |
getUnitName | public static String getUnitName(JasperReport report, JRCrosstab crosstab)(Code) | | Returns the name of the expression evaluator unit for a crosstab of a report.
Parameters: report - the report Parameters: crosstab - the crosstab the generated expression evaluator unit name |
loadEvaluator | abstract protected JREvaluator loadEvaluator(Serializable compileData, String unitName) throws JRException(Code) | | Creates an expression evaluator instance from data saved when the report was compiled.
Parameters: compileData - the data saved when the report was compiled Parameters: unitName - the evaluator unit name an expression evaluator instance throws: JRException - |
|
|