org.apache.jasper.compiler
Class OnlyReadingJspPseudoCompiler

java.lang.Object
  extended by org.apache.jasper.compiler.Compiler
      extended by org.apache.jasper.compiler.OnlyReadingJspPseudoCompiler

public class OnlyReadingJspPseudoCompiler
extends org.apache.jasper.compiler.Compiler

A simple Compiler subclass that overrides generateJava() to invoke the Visitor of our choice.


Field Summary
 
Fields inherited from class org.apache.jasper.compiler.Compiler
ctxt, errDispatcher, jsw, log, options, pageInfo, pageNodes, tfp
 
Constructor Summary
OnlyReadingJspPseudoCompiler()
           
 
Method Summary
protected  void generateClass(String[] smap)
           
protected  String[] generateJava()
           
 boolean isOutDated(boolean checkClass)
          The parent's implementation, in our case, checks whether the target file exists and returns true if it doesn't.
 
Methods inherited from class org.apache.jasper.compiler.Compiler
compile, compile, compile, getCompilationContext, getErrorDispatcher, getPageInfo, getPageNodes, init, isOutDated, removeGeneratedClassFiles, removeGeneratedFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlyReadingJspPseudoCompiler

public OnlyReadingJspPseudoCompiler()
Method Detail

generateClass

protected void generateClass(String[] smap)
                      throws FileNotFoundException,
                             org.apache.jasper.JasperException,
                             Exception
Specified by:
generateClass in class org.apache.jasper.compiler.Compiler
Throws:
FileNotFoundException
org.apache.jasper.JasperException
Exception

generateJava

protected String[] generateJava()
                         throws Exception
Overrides:
generateJava in class org.apache.jasper.compiler.Compiler
Throws:
Exception

isOutDated

public boolean isOutDated(boolean checkClass)
The parent's implementation, in our case, checks whether the target file exists and returns true if it doesn't. However it is expensive so we skip it by returning true directly.

Overrides:
isOutDated in class org.apache.jasper.compiler.Compiler
See Also:
JspCompilationContext.getServletJavaFileName()


Copyright © 2011. All Rights Reserved.