net.sf.jasperreports.engine.design
Class JRAbstractJavaCompiler

java.lang.Object
  extended by net.sf.jasperreports.engine.design.JRAbstractCompiler
      extended by net.sf.jasperreports.engine.design.JRAbstractJavaCompiler
All Implemented Interfaces:
JRCompiler
Direct Known Subclasses:
JRAbstractClassCompiler, JRGroovyCompiler, JRJdtCompiler

public abstract class JRAbstractJavaCompiler
extends JRAbstractCompiler

Version:
$Id: JRAbstractJavaCompiler.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static java.lang.String 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.
 
Fields inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
jasperReportsContext
 
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
protected JRAbstractJavaCompiler(boolean needsSourceFiles)
          Deprecated. Replaced by JRAbstractJavaCompiler(JasperReportsContext, boolean).
protected JRAbstractJavaCompiler(JasperReportsContext jasperReportsContext, boolean needsSourceFiles)
           
 
Method Summary
protected static java.lang.Object classCacheKey()
           
protected static java.lang.Class<?> getClassFromCache(java.lang.String className)
           
protected  JREvaluator loadEvaluator(java.io.Serializable compileData, java.lang.String className)
          Creates an expression evaluator instance from data saved when the report was compiled.
protected static void putClassInCache(java.lang.String className, java.lang.Class<?> loadedClass)
           
 
Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler
checkLanguage, compileReport, compileUnits, generateSourceCode, getCompilerClass, getSourceFileName, getUnitName, getUnitName, getUnitName, getUnitName, getUnitName, loadEvaluator, loadEvaluator, loadEvaluator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_EVALUATOR_CLASS_REFERENCE_FIX_ENABLED

public static final java.lang.String 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:
Constant Field Values
Constructor Detail

JRAbstractJavaCompiler

protected JRAbstractJavaCompiler(JasperReportsContext jasperReportsContext,
                                 boolean needsSourceFiles)

JRAbstractJavaCompiler

protected JRAbstractJavaCompiler(boolean needsSourceFiles)
Deprecated. Replaced by JRAbstractJavaCompiler(JasperReportsContext, boolean).

Method Detail

loadEvaluator

protected JREvaluator loadEvaluator(java.io.Serializable compileData,
                                    java.lang.String className)
                             throws JRException
Description copied from class: JRAbstractCompiler
Creates an expression evaluator instance from data saved when the report was compiled.

Specified by:
loadEvaluator in class JRAbstractCompiler
Parameters:
compileData - the data saved when the report was compiled
className - the evaluator unit name
Returns:
an expression evaluator instance
Throws:
JRException

classCacheKey

protected static java.lang.Object classCacheKey()

getClassFromCache

protected static java.lang.Class<?> getClassFromCache(java.lang.String className)

putClassInCache

protected static void putClassInCache(java.lang.String className,
                                      java.lang.Class<?> loadedClass)


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com