Class CustomJRJdtCompiler
- java.lang.Object
-
- net.sf.jasperreports.engine.design.JRAbstractCompiler
-
- net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
-
- org.opennms.reporting.jasperreports.compiler.CustomJRJdtCompiler
-
- All Implemented Interfaces:
net.sf.jasperreports.engine.design.JRCompiler
public class CustomJRJdtCompiler extends net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
This class is a fork of net.sf.jasperreports.engine.design.JRJdtCompiler from JasperReports 6.3.0. It was modified to support JDT 4.2.2 which is required by some of the other components in our class-path i.e. Drools and Jetty.- Author:
- jwhite, Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomJRJdtCompiler.CompilationUnit
static class
CustomJRJdtCompiler.CompilationUnitResult
static class
CustomJRJdtCompiler.CompilerRequestor
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXCEPTION_MESSAGE_KEY_CLASS_LOADING_ERROR
static java.lang.String
EXCEPTION_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
-
-
Constructor Summary
Constructors Constructor Description CustomJRJdtCompiler(net.sf.jasperreports.engine.JasperReportsContext jasperReportsContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkLanguage(java.lang.String language)
protected java.lang.String
compileUnits(net.sf.jasperreports.engine.design.JRCompilationUnit[] units, java.lang.String classpath, java.io.File tempDirFile)
protected net.sf.jasperreports.engine.design.JRCompilationSourceCode
generateSourceCode(net.sf.jasperreports.engine.design.JRSourceCompileTask sourceTask)
protected java.lang.String
getCompilerClass()
protected CustomJRJdtCompiler.CompilerRequestor
getCompilerRequestor(net.sf.jasperreports.engine.design.JRCompilationUnit[] units)
protected org.eclipse.jdt.internal.compiler.impl.CompilerOptions
getJdtSettings()
protected org.eclipse.jdt.internal.compiler.env.INameEnvironment
getNameEnvironment(net.sf.jasperreports.engine.design.JRCompilationUnit[] units)
protected java.io.InputStream
getResource(java.lang.String resourceName)
protected java.lang.String
getSourceFileName(java.lang.String unitName)
protected java.lang.Class<?>
loadClass(java.lang.String className)
protected net.sf.jasperreports.engine.design.JRCompilationUnit
recreateCompileUnit(net.sf.jasperreports.engine.design.JRCompilationUnit compilationUnit, java.util.Set<java.lang.reflect.Method> missingMethods)
-
Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
classCacheKey, getClassFromCache, loadEvaluator, putClassInCache
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_CLASS_LOADING_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_CLASS_LOADING_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NAME_ENVIRONMENT_ANSWER_INSTANCE_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NAME_ENVIRONMENT_ANSWER_INSTANCE_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
compileUnits
protected java.lang.String compileUnits(net.sf.jasperreports.engine.design.JRCompilationUnit[] units, java.lang.String classpath, java.io.File tempDirFile)
- Specified by:
compileUnits
in classnet.sf.jasperreports.engine.design.JRAbstractCompiler
-
getNameEnvironment
protected org.eclipse.jdt.internal.compiler.env.INameEnvironment getNameEnvironment(net.sf.jasperreports.engine.design.JRCompilationUnit[] units)
-
getCompilerRequestor
protected CustomJRJdtCompiler.CompilerRequestor getCompilerRequestor(net.sf.jasperreports.engine.design.JRCompilationUnit[] units)
-
getJdtSettings
protected org.eclipse.jdt.internal.compiler.impl.CompilerOptions getJdtSettings()
-
getResource
protected java.io.InputStream getResource(java.lang.String resourceName)
-
loadClass
protected java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
checkLanguage
protected void checkLanguage(java.lang.String language) throws net.sf.jasperreports.engine.JRException
- Specified by:
checkLanguage
in classnet.sf.jasperreports.engine.design.JRAbstractCompiler
- Throws:
net.sf.jasperreports.engine.JRException
-
recreateCompileUnit
protected net.sf.jasperreports.engine.design.JRCompilationUnit recreateCompileUnit(net.sf.jasperreports.engine.design.JRCompilationUnit compilationUnit, java.util.Set<java.lang.reflect.Method> missingMethods)
-
generateSourceCode
protected net.sf.jasperreports.engine.design.JRCompilationSourceCode generateSourceCode(net.sf.jasperreports.engine.design.JRSourceCompileTask sourceTask) throws net.sf.jasperreports.engine.JRException
- Specified by:
generateSourceCode
in classnet.sf.jasperreports.engine.design.JRAbstractCompiler
- Throws:
net.sf.jasperreports.engine.JRException
-
getSourceFileName
protected java.lang.String getSourceFileName(java.lang.String unitName)
- Specified by:
getSourceFileName
in classnet.sf.jasperreports.engine.design.JRAbstractCompiler
-
getCompilerClass
protected java.lang.String getCompilerClass()
- Overrides:
getCompilerClass
in classnet.sf.jasperreports.engine.design.JRAbstractCompiler
-
-