## org.apache.jasper.compiler
Class AntJavaCompiler

    java.lang.Object
      org.apache.jasper.compiler.AntJavaCompiler

    public class AntJavaCompiler

extends Object

Java compiler through ant

Author:
  Kin-man Chung

Constructor Summary
`AntJavaCompiler()`

Method Summary
`JavacErrorDetail[]` `compile(String className, Node.Nodes pageNodes)` Start Java compilation
`void` `doJavaFile(boolean keep)` Remove/save the generated Java File from/to disk
`long` `getClassLastModified()` Return the time the class file was generated.
`Writer` `getJavaWriter(String javaFileName, String javaEncoding)` Get a Writer for the Java file.
`void` `init(JspCompilationContext ctxt, ErrorDispatcher errDispatcher, boolean suppressLogging)` Initializations
`void` `saveClassFile(String className, String classFileName)` Save the generated class file to disk, if not already done.
`void` `setClassPath(List<File> cpath)` Java Compiler options.
`void` `setDebug(boolean debug)`
`void` `setExtdirs(String exts)`
`void` `setSourceVM(String sourceVM)`
`void` `setTargetVM(String targetVM)`
`static void` `shutdownThreadPool()`
`static void` `startThreadPool()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AntJavaCompiler

    public AntJavaCompiler()

Method Detail

### init

    public void init(JspCompilationContext ctxt,
                     ErrorDispatcher errDispatcher,
                     boolean suppressLogging)

  Initializations

### setExtdirs

    public void setExtdirs(String exts)

### setTargetVM

    public void setTargetVM(String targetVM)

### setSourceVM

    public void setSourceVM(String sourceVM)

### setClassPath

    public void setClassPath(List<File> cpath)

  Java Compiler options.

### saveClassFile

    public void saveClassFile(String className,
                              String classFileName)

  Save the generated class file to disk, if not already done.

### setDebug

    public void setDebug(boolean debug)

### getClassLastModified

    public long getClassLastModified()

  Return the time the class file was generated.

### getJavaWriter

    public Writer getJavaWriter(String javaFileName,
                                String javaEncoding)
                         throws JasperException

  Get a Writer for the Java file. The writer is used by JSP compiler. This method allows the Java compiler control where the Java file should be generated so it knows how to handle the input for java compilation accordingly.

  Throws:
    `JasperException`

### compile

    public JavacErrorDetail[] compile(String className,
                                      Node.Nodes pageNodes)
                               throws JasperException

  Start Java compilation

  Parameters:
    `className` - Name of the class under compilation
  Throws:
    `JasperException`

### doJavaFile

    public void doJavaFile(boolean keep)

  Remove/save the generated Java File from/to disk

### startThreadPool

    public static void startThreadPool()

### shutdownThreadPool

    public static void shutdownThreadPool()

Copyright © 2008 Mort Bay Consulting. All Rights Reserved.