net.sf.jasperreports.compilers
Class JavaScriptClassCompiler
java.lang.Object
net.sf.jasperreports.engine.design.JRAbstractCompiler
net.sf.jasperreports.compilers.JavaScriptCompilerBase
net.sf.jasperreports.compilers.JavaScriptClassCompiler
- All Implemented Interfaces:
- JRCompiler
public class JavaScriptClassCompiler
- extends JavaScriptCompilerBase
Compiler for reports that use JavaScript as expression language.
This implementation produces Java bytecode for the expressions.
- Version:
- $Id: JavaScriptClassCompiler.java 5451 2012-06-14 15:35:10Z lucianc $
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
JavaScriptCompiledData
,
JavaScriptCompiledEvaluator
Field Summary |
static java.lang.String |
PROPERTY_EXPRESSIONS_PER_SCRIPT
Property that determines the maximum number of report expressions that will be included
in a single generated Java class. |
static java.lang.String |
PROPERTY_OPTIMIZATION_LEVEL
Property that determines the optimization level to use when compiling expressions
into Java bytecode. |
static java.lang.String |
PROPERTY_SCRIPT_MAX_SIZE
Property that determines the maximum size of a script that will be compiled into
a single Java class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_OPTIMIZATION_LEVEL
public static final java.lang.String PROPERTY_OPTIMIZATION_LEVEL
- Property that determines the optimization level to use when compiling expressions
into Java bytecode.
See
- See Also:
- Constant Field Values
PROPERTY_EXPRESSIONS_PER_SCRIPT
public static final java.lang.String PROPERTY_EXPRESSIONS_PER_SCRIPT
- Property that determines the maximum number of report expressions that will be included
in a single generated Java class.
- See Also:
- Constant Field Values
PROPERTY_SCRIPT_MAX_SIZE
public static final java.lang.String PROPERTY_SCRIPT_MAX_SIZE
- Property that determines the maximum size of a script that will be compiled into
a single Java class.
- See Also:
- Constant Field Values
JavaScriptClassCompiler
public JavaScriptClassCompiler(JasperReportsContext jasperReportsContext)
- Creates a JavaScript compiler.
JavaScriptClassCompiler
public JavaScriptClassCompiler()
- Deprecated. Replaced by
#JavaScriptCompiler(JasperReportsContext)
.
compileUnits
protected java.lang.String compileUnits(JRCompilationUnit[] units,
java.lang.String classpath,
java.io.File tempDirFile)
throws JRException
- Description copied from class:
JRAbstractCompiler
- Compiles several expression evaluator units.
The result of the compilation should be set by calling
setCompileData
on all compile units.
- Specified by:
compileUnits
in class JRAbstractCompiler
- Parameters:
units
- the compilation unitsclasspath
- the compilation classpathtempDirFile
- temporary directory
- Returns:
- a string containing compilation errors, or null if the compilation was successfull
- Throws:
JRException
compileScripts
protected void compileScripts(JRCompilationUnit unit,
org.mozilla.javascript.CompilerEnvirons compilerEnv,
JavaScriptClassCompiler.CompileSources compileSources,
JavaScriptCompiledData compiledData)
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com