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 String
static final String
static final String
Property 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, 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
ConstructorsModifierConstructorDescriptionprotected
JRAbstractJavaCompiler
(JasperReportsContext jasperReportsContext, boolean needsSourceFiles) -
Method Summary
Modifier and TypeMethodDescriptionprotected static Object
protected DirectExpressionValueFilter
protected static Class
<?> getClassFromCache
(String className) protected Class
<?> protected Class
<?> loadClass
(String className, CompiledClasses classes) protected JREvaluator
loadEvaluator
(Serializable compileData, String className) Creates an expression evaluator instance from data saved when the report was compiled.protected static void
putClassInCache
(String className, Class<?> loadedClass) protected CompiledClasses
toCompiledClasses
(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:
directValueFilter
in classJRAbstractCompiler
-
loadEvaluator
Description copied from class:JRAbstractCompiler
Creates an expression evaluator instance from data saved when the report was compiled.- Specified by:
loadEvaluator
in 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
-