|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jasper.compiler.Compiler
public abstract class Compiler
Main JSP compiler class. This class uses Ant for compiling.
Field Summary | |
---|---|
protected JspCompilationContext |
ctxt
|
protected ErrorDispatcher |
errDispatcher
|
protected JspServletWrapper |
jsw
|
protected org.jboss.logging.Logger |
log
|
protected Options |
options
|
protected org.apache.jasper.compiler.PageInfo |
pageInfo
|
protected Node.Nodes |
pageNodes
|
protected org.apache.jasper.compiler.TagFileProcessor |
tfp
|
Constructor Summary | |
---|---|
Compiler()
|
Method Summary | |
---|---|
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.lang.String[] smap)
Compile the servlet from .java file to .class file |
protected java.lang.String[] |
generateJava()
Compile the jsp file into equivalent servlet in .java file |
JspCompilationContext |
getCompilationContext()
|
ErrorDispatcher |
getErrorDispatcher()
Gets the error dispatcher. |
org.apache.jasper.compiler.PageInfo |
getPageInfo()
Gets the info about the page under compilation |
Node.Nodes |
getPageNodes()
Retrieves the parsed nodes of the JSP page, if they are available. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.jboss.logging.Logger log
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
Constructor Detail |
---|
public Compiler()
Method Detail |
---|
public void init(JspCompilationContext ctxt, JspServletWrapper jsw)
public Node.Nodes getPageNodes()
Retrieves the parsed nodes of the JSP page, if they are available. May return null. Used in development mode for generating detailed error messages. http://issues.apache.org/bugzilla/show_bug.cgi?id=37062.
protected java.lang.String[] generateJava() throws java.lang.Exception
java.lang.Exception
protected abstract void generateClass(java.lang.String[] smap) throws java.io.FileNotFoundException, JasperException, java.lang.Exception
java.io.FileNotFoundException
JasperException
java.lang.Exception
public void compile() throws java.io.FileNotFoundException, JasperException, java.lang.Exception
java.io.FileNotFoundException
JasperException
java.lang.Exception
public 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 file
java.io.FileNotFoundException
JasperException
java.lang.Exception
public 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 otherwise
java.io.FileNotFoundException
JasperException
java.lang.Exception
public boolean isOutDated()
public boolean isOutDated(boolean checkClass)
checkClass
- If true, check against .class file, if false, check against
.java file.public ErrorDispatcher getErrorDispatcher()
public org.apache.jasper.compiler.PageInfo getPageInfo()
public JspCompilationContext getCompilationContext()
public void removeGeneratedFiles()
public void removeGeneratedClassFiles()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |