AntCompiler (Apache Tomcat 9.0.37 API Documentation)

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.
  Author:
    Anil K. Vijendran, Mandar Raje, Pierre Delisle, Kin-man Chung, Remy Maucherat, Mark Roth

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AntCompiler.JasperAntLogger`
    `protected static class` | `AntCompiler.SystemLogHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Object` | `javacLock`
    `protected AntCompiler.JasperAntLogger` | `logger`
    `protected org.apache.tools.ant.Project` | `project`

    - ### Fields inherited from class org.apache.jasper.compiler.Compiler

      `ctxt, errDispatcher, jsw, options, pageInfo, pageNodes, tfp`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AntCompiler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `generateClass(Map<String,SmapStratum> smaps)` Compile the servlet from .java file to .class file
    `protected org.apache.tools.ant.Project` | `getProject()`

    - ### Methods inherited from class org.apache.jasper.compiler.Compiler

      `compile, compile, compile, generateJava, getCompilationContext, getErrorDispatcher, getPageInfo, getSmap, init, isOutDated, isOutDated, removeGeneratedClassFiles, removeGeneratedFiles`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### javacLock

          protected static final Object javacLock

    - #### project

          protected org.apache.tools.ant.Project project

    - #### logger

          protected AntCompiler.JasperAntLogger logger

  - ### Constructor Detail

    - #### AntCompiler

          public AntCompiler()

  - ### Method Detail

    - #### getProject

          protected org.apache.tools.ant.Project getProject()

    - #### generateClass

          protected void generateClass(Map<String,SmapStratum> smaps)
                                throws FileNotFoundException,
                                       JasperException,
                                       Exception

      Compile the servlet from .java file to .class file
      Specified by:
        `generateClass` in class `Compiler`
      Parameters:
        `smaps` - The source maps for the class(es) generated from the source file
      Throws:
        `FileNotFoundException` - Source files not found
        `JasperException` - Compilation error
        `Exception` - Some other error

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.