public abstract class Compiler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected JspCompilationContext |
ctxt |
protected ErrorDispatcher |
errDispatcher |
protected JspServletWrapper |
jsw |
protected Options |
options |
protected org.apache.jasper.compiler.PageInfo |
pageInfo |
protected Node.Nodes |
pageNodes |
protected org.apache.jasper.compiler.TagFileProcessor |
tfp |
Constructor and Description |
---|
Compiler() |
Modifier and Type | Method and Description |
---|---|
void |
compile()
Compile the jsp file from the current engine context.
|
void |
compile(boolean compileClass)
Compile the jsp file from the current engine context.
|
void |
compile(boolean compileClass,
boolean jspcMode)
Compile the jsp file from the current engine context.
|
protected abstract void |
generateClass(java.util.Map<java.lang.String,SmapStratum> smaps)
Servlet compilation.
|
protected java.util.Map<java.lang.String,SmapStratum> |
generateJava()
Compile the jsp file into equivalent servlet in .java file
|
JspCompilationContext |
getCompilationContext() |
ErrorDispatcher |
getErrorDispatcher() |
org.apache.jasper.compiler.PageInfo |
getPageInfo() |
SmapStratum |
getSmap(java.lang.String className) |
void |
init(JspCompilationContext ctxt,
JspServletWrapper jsw) |
boolean |
isOutDated()
This is a protected method intended to be overridden by subclasses of
Compiler.
|
boolean |
isOutDated(boolean checkClass)
Determine if a compilation is necessary by checking the time stamp of the
JSP page with that of the corresponding .class or .java file.
|
void |
removeGeneratedClassFiles() |
void |
removeGeneratedFiles()
Remove generated files
|
protected JspCompilationContext ctxt
protected ErrorDispatcher errDispatcher
protected org.apache.jasper.compiler.PageInfo pageInfo
protected JspServletWrapper jsw
protected org.apache.jasper.compiler.TagFileProcessor tfp
protected Options options
protected Node.Nodes pageNodes
public void init(JspCompilationContext ctxt, JspServletWrapper jsw)
public SmapStratum getSmap(java.lang.String className)
protected java.util.Map<java.lang.String,SmapStratum> generateJava() throws java.lang.Exception
java.lang.Exception
- Error generating Java sourceprotected abstract void generateClass(java.util.Map<java.lang.String,SmapStratum> smaps) throws java.io.FileNotFoundException, JasperException, java.lang.Exception
smaps
- The source maps for the class(es) generated from the source
filejava.io.FileNotFoundException
- Source files not foundJasperException
- Compilation errorjava.lang.Exception
- Some other errorpublic void compile() throws java.io.FileNotFoundException, JasperException, java.lang.Exception
java.io.FileNotFoundException
- Source files not foundJasperException
- Compilation errorjava.lang.Exception
- Some other errorpublic void compile(boolean compileClass) throws java.io.FileNotFoundException, JasperException, java.lang.Exception
compileClass
- If true, generate both .java and .class file If false,
generate only .java filejava.io.FileNotFoundException
- Source files not foundJasperException
- Compilation errorjava.lang.Exception
- Some other errorpublic void compile(boolean compileClass, boolean jspcMode) throws java.io.FileNotFoundException, JasperException, java.lang.Exception
compileClass
- If true, generate both .java and .class file If false,
generate only .java filejspcMode
- true if invoked from JspC, false otherwisejava.io.FileNotFoundException
- Source files not foundJasperException
- Compilation errorjava.lang.Exception
- Some other errorpublic boolean isOutDated()
true
if the source generation and compilation
should occurpublic boolean isOutDated(boolean checkClass)
checkClass
- If true, check against .class file, if false, check against
.java file.true
if the source generation and compilation
should occurpublic ErrorDispatcher getErrorDispatcher()
public org.apache.jasper.compiler.PageInfo getPageInfo()
public JspCompilationContext getCompilationContext()
public void removeGeneratedFiles()
public void removeGeneratedClassFiles()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.