All Implemented Interfaces:
Compiler

public class Javac extends AbstractCompiler
This class wraps the Sun's Javac Compiler.
Since:
2.0
Author:
Davanum Srinivas, Stefano Mazzocchi
  • Field Details

  • Constructor Details

    • Javac

      public Javac()
  • Method Details

    • compile

      public boolean compile() throws IOException
      Compile a source file yielding a loadable class file.
      Throws:
      IOException - If an error occurs during compilation
    • parseStream

      protected List parseStream(BufferedReader input) throws IOException
      Parse the compiler error stream to produce a list of CompilerErrors
      Specified by:
      parseStream in class AbstractCompiler
      Parameters:
      input - The error stream
      Returns:
      The list of compiler error messages
      Throws:
      IOException - If an error occurs during message collection
    • parseModernStream

      protected List parseModernStream(BufferedReader input) throws IOException
      Parse the compiler error stream to produce a list of CompilerErrors
      Parameters:
      input - The error stream
      Returns:
      The list of compiler error messages
      Throws:
      IOException - If an error occurs during message collection
    • parseClassicStream

      protected List parseClassicStream(BufferedReader input) throws IOException
      Parse the compiler error stream to produce a list of CompilerErrors
      Parameters:
      input - The error stream
      Returns:
      The list of compiler error messages
      Throws:
      IOException - If an error occurs during message collection
    • toString

      public String toString()
      Overrides:
      toString in class Object