Package org.apache.jasper.compiler
Class AntCompiler
- java.lang.Object
-
- org.apache.jasper.compiler.Compiler
-
- org.apache.jasper.compiler.AntCompiler
-
public class AntCompiler extends Compiler
Main JSP compiler class. This class uses Ant for compiling.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAntCompiler.JasperAntLoggerAnt logger that captures compilation output for reporting.protected static classAntCompiler.SystemLogHandlerHandler that captures System.err output for compilation error reporting.
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.ObjectjavacLockLock object used to synchronize javac compilation when not forking.protected AntCompiler.JasperAntLoggerloggerThe Ant build listener that captures compilation output.protected org.apache.tools.ant.ProjectprojectThe Ant project used for compilation.
-
Constructor Summary
Constructors Constructor Description AntCompiler()Constructs a new AntCompiler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgenerateClass(java.util.Map<java.lang.String,SmapStratum> smaps)Servlet compilation.protected org.apache.tools.ant.ProjectgetProject()Returns the Ant project, initializing it if necessary.-
Methods inherited from class org.apache.jasper.compiler.Compiler
compile, compile, compile, generateJava, getCompilationContext, getErrorDispatcher, getPageInfo, getSmap, init, isOutDated, isOutDated, removeGeneratedClassFiles, removeGeneratedFiles
-
-
-
-
Field Detail
-
javacLock
protected static final java.lang.Object javacLock
Lock object used to synchronize javac compilation when not forking.
-
project
protected org.apache.tools.ant.Project project
The Ant project used for compilation.
-
logger
protected AntCompiler.JasperAntLogger logger
The Ant build listener that captures compilation output.
-
-
Method Detail
-
getProject
protected org.apache.tools.ant.Project getProject()
Returns the Ant project, initializing it if necessary.- Returns:
- the Ant project
-
generateClass
protected void generateClass(java.util.Map<java.lang.String,SmapStratum> smaps) throws java.io.FileNotFoundException, JasperException, java.lang.Exception
Description copied from class:CompilerServlet compilation. This compiles the generated sources into Servlets.- Specified by:
generateClassin classCompiler- Parameters:
smaps- The source maps for the class(es) generated from the source file- Throws:
java.io.FileNotFoundException- Source files not foundJasperException- Compilation errorjava.lang.Exception- Some other error
-
-