Class JRAbstractJavaCompiler
java.lang.Object
net.sf.jasperreports.engine.design.JRAbstractCompiler
net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
- All Implemented Interfaces:
JRCompiler
- Direct Known Subclasses:
JRAbstractClassCompiler,JRGroovyCompiler,JRJdtCompiler
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringProperty that indicates whether a legacy fix for a JVM issue related to evaluator classes generated by JasperReports is 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, reportClassFilterFields inherited from interface net.sf.jasperreports.engine.design.JRCompiler
COMPILER_CLASS, COMPILER_CLASSPATH, COMPILER_KEEP_JAVA_FILE, COMPILER_PREFIX, COMPILER_TEMP_DIR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRAbstractJavaCompiler(JasperReportsContext jasperReportsContext, boolean needsSourceFiles) -
Method Summary
Modifier and TypeMethodDescriptionprotected static Objectprotected DirectExpressionValueFilterprotected static Class<?> getClassFromCache(String className) protected Class<?> protected Class<?> loadClass(String className, CompiledClasses classes) protected JREvaluatorloadEvaluator(Serializable compileData, String className) Creates an expression evaluator instance from data saved when the report was compiled.protected static voidputClassInCache(String className, Class<?> loadedClass) protected CompiledClassestoCompiledClasses(String className, Serializable compileData) Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
checkLanguage, compileReport, compileUnits, createCompileData, createEvaluator, effectiveDirectValueFilter, generateSourceCode, getCompilerClass, getSourceFile, getSourceFileName, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
-
Field Details
-
PROPERTY_EVALUATOR_CLASS_REFERENCE_FIX_ENABLED
Property that indicates whether a legacy fix for a JVM issue related to evaluator classes generated by JasperReports is enabled. The fix is enabled by default. Due to the fix, the garbage collector might not be able to collect a classloader that loaded JasperReports classes. This would be inconvenient in scenarios in which JasperReports classes are repeatedly loaded by different classloaders, e.g. when JasperReports is part of the classpath of a web application which is often reloaded. In such scenarios, set this property to false.- See Also:
-
EXCEPTION_MESSAGE_KEY_EXPECTED_JAVA_LANGUAGE
- See Also:
-
EXCEPTION_MESSAGE_KEY_EXPRESSION_CLASS_NOT_LOADED
- See Also:
-
-
Constructor Details
-
JRAbstractJavaCompiler
protected JRAbstractJavaCompiler(JasperReportsContext jasperReportsContext, boolean needsSourceFiles)
-
-
Method Details
-
directValueFilter
- Overrides:
directValueFilterin classJRAbstractCompiler
-
loadEvaluator
Description copied from class:JRAbstractCompilerCreates an expression evaluator instance from data saved when the report was compiled.- Specified by:
loadEvaluatorin classJRAbstractCompiler- Parameters:
compileData- the data saved when the report was compiledclassName- the evaluator unit name- Returns:
- an expression evaluator instance
- Throws:
JRException
-
toCompiledClasses
-
loadClass
-
loadClass
-
classCacheKey
-
getClassFromCache
-
putClassInCache
-