Package net.sf.jasperreports.jdt
Class JRJdtCompiler
- java.lang.Object
-
- net.sf.jasperreports.engine.design.JRAbstractCompiler
-
- net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
-
- net.sf.jasperreports.jdt.JRJdtCompiler
-
- All Implemented Interfaces:
JRCompiler
public class JRJdtCompiler extends JRAbstractJavaCompiler
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJRJdtCompiler.CompilationUnitstatic classJRJdtCompiler.CompilationUnitResultstatic classJRJdtCompiler.CompilerRequestor
-
Field Summary
Fields Modifier and Type Field Description static StringEXCEPTION_MESSAGE_KEY_CLASS_LOADING_ERRORstatic StringEXCEPTION_MESSAGE_KEY_NAME_ENVIRONMENT_ANSWER_INSTANCE_ERROR-
Fields inherited from class net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
EXCEPTION_MESSAGE_KEY_EXPECTED_JAVA_LANGUAGE, EXCEPTION_MESSAGE_KEY_EXPRESSION_CLASS_NOT_LOADED, PROPERTY_EVALUATOR_CLASS_REFERENCE_FIX_ENABLED
-
Fields inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
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, reportClassFilter
-
Fields inherited from interface net.sf.jasperreports.engine.design.JRCompiler
COMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR
-
-
Constructor Summary
Constructors Constructor Description JRJdtCompiler(JasperReportsContext jasperReportsContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckLanguage(String language)protected StringcompileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile)protected JRCompilationSourceCodegenerateSourceCode(JRSourceCompileTask sourceTask)protected StringgetCompilerClass()protected JRJdtCompiler.CompilerRequestorgetCompilerRequestor(JRCompilationUnit[] units)protected Map<String,String>getJdtSettings()protected org.eclipse.jdt.internal.compiler.env.INameEnvironmentgetNameEnvironment(JRCompilationUnit[] units)protected InputStreamgetResource(String resourceName)protected StringgetSourceFileName(String unitName)protected Class<?>loadClass(String className)protected JRCompilationUnitrecreateCompileUnit(JRCompilationUnit compilationUnit, Set<Method> missingMethods)-
Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
classCacheKey, directValueFilter, getClassFromCache, loadClass, loadClass, loadEvaluator, putClassInCache, toCompiledClasses
-
Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
compileReport, createCompileData, createEvaluator, effectiveDirectValueFilter, getSourceFile, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_CLASS_LOADING_ERROR
public static final String EXCEPTION_MESSAGE_KEY_CLASS_LOADING_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NAME_ENVIRONMENT_ANSWER_INSTANCE_ERROR
public static final String EXCEPTION_MESSAGE_KEY_NAME_ENVIRONMENT_ANSWER_INSTANCE_ERROR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JRJdtCompiler
public JRJdtCompiler(JasperReportsContext jasperReportsContext)
-
-
Method Detail
-
compileUnits
protected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile)
- Specified by:
compileUnitsin classJRAbstractCompiler
-
getNameEnvironment
protected org.eclipse.jdt.internal.compiler.env.INameEnvironment getNameEnvironment(JRCompilationUnit[] units)
-
getCompilerRequestor
protected JRJdtCompiler.CompilerRequestor getCompilerRequestor(JRCompilationUnit[] units)
-
getResource
protected InputStream getResource(String resourceName)
-
loadClass
protected Class<?> loadClass(String className) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
checkLanguage
protected void checkLanguage(String language) throws JRException
- Specified by:
checkLanguagein classJRAbstractCompiler- Throws:
JRException
-
recreateCompileUnit
protected JRCompilationUnit recreateCompileUnit(JRCompilationUnit compilationUnit, Set<Method> missingMethods)
-
generateSourceCode
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException
- Specified by:
generateSourceCodein classJRAbstractCompiler- Throws:
JRException
-
getSourceFileName
protected String getSourceFileName(String unitName)
- Specified by:
getSourceFileNamein classJRAbstractCompiler
-
getCompilerClass
protected String getCompilerClass()
- Overrides:
getCompilerClassin classJRAbstractCompiler
-
-