|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.design.JRAbstractCompiler
net.sf.jasperreports.compilers.JavaScriptCompilerBase
public abstract class JavaScriptCompilerBase
Base compiler class for reports that use JavaScript as expression language.
Nested Class Summary | |
---|---|
protected static class |
JavaScriptCompilerBase.Errors
|
protected static class |
JavaScriptCompilerBase.ScriptExpressionVisitor
|
Field Summary |
---|
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 |
JavaScriptCompilerBase()
Deprecated. Replaced by #JavaScriptCompiler(JasperReportsContext) . |
protected |
JavaScriptCompilerBase(JasperReportsContext jasperReportsContext)
Creates a JavaScript compiler. |
Method Summary | |
---|---|
protected void |
checkLanguage(java.lang.String language)
Checks that the report language is supported by the compiler. |
protected JavaScriptCompilerBase.ScriptExpressionVisitor |
defaultExpressionCreator()
|
protected JavaScriptCompilerBase.ScriptExpressionVisitor |
estimatedExpressionCreator()
|
protected JRCompilationSourceCode |
generateSourceCode(JRSourceCompileTask sourceTask)
Generates expression evaluator code. |
protected static java.lang.String |
getFieldVar(java.lang.String name)
|
protected static java.lang.String |
getParameterVar(java.lang.String name)
|
protected java.lang.String |
getSourceFileName(java.lang.String unitName)
Returns the name of the source file where generated source code for an unit is saved. |
protected static java.lang.String |
getVariableVar(java.lang.String name)
|
protected JREvaluator |
loadEvaluator(java.io.Serializable compileData,
java.lang.String unitName)
Creates an expression evaluator instance from data saved when the report was compiled. |
protected JavaScriptCompilerBase.ScriptExpressionVisitor |
oldExpressionCreator()
|
Methods inherited from class net.sf.jasperreports.engine.design.JRAbstractCompiler |
---|
compileReport, compileUnits, getCompilerClass, 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 |
Constructor Detail |
---|
protected JavaScriptCompilerBase(JasperReportsContext jasperReportsContext)
protected JavaScriptCompilerBase()
#JavaScriptCompiler(JasperReportsContext)
.
Method Detail |
---|
protected void checkLanguage(java.lang.String language) throws JRException
JRAbstractCompiler
checkLanguage
in class JRAbstractCompiler
language
- the report language
JRException
protected JRCompilationSourceCode generateSourceCode(JRSourceCompileTask sourceTask) throws JRException
JRAbstractCompiler
generateSourceCode
in class JRAbstractCompiler
sourceTask
- the source code generation information
JRException
protected java.lang.String getSourceFileName(java.lang.String unitName)
JRAbstractCompiler
If the compiler needs source files for compilation
or COMPILER_KEEP_JAVA_FILE
is set, the generated source
will be saved in a file having the name returned by this method.
getSourceFileName
in class JRAbstractCompiler
unitName
- the unit name
protected JREvaluator loadEvaluator(java.io.Serializable compileData, java.lang.String unitName) throws JRException
JRAbstractCompiler
loadEvaluator
in class JRAbstractCompiler
compileData
- the data saved when the report was compiledunitName
- the evaluator unit name
JRException
protected JavaScriptCompilerBase.ScriptExpressionVisitor defaultExpressionCreator()
protected JavaScriptCompilerBase.ScriptExpressionVisitor oldExpressionCreator()
protected JavaScriptCompilerBase.ScriptExpressionVisitor estimatedExpressionCreator()
protected static java.lang.String getParameterVar(java.lang.String name)
protected static java.lang.String getVariableVar(java.lang.String name)
protected static java.lang.String getFieldVar(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |