org.codehaus.plexus.compiler.javac
Class JavacCompiler
AbstractCompiler
org.codehaus.plexus.compiler.javac.JavacCompiler
public class JavacCompiler
extends AbstractCompiler
$Id: JavacCompiler.java 3081 2006-03-22 06:55:18Z carlos $
static String[] | buildCompilerArguments(CompilerConfiguration config, String[] sourceFiles)
|
List | compile(CompilerConfiguration config)
|
(package private) List | compileInProcess(String[] args) - Compile the java sources in the current JVM, without calling an external executable,
using
com.sun.tools.javac.Main class
|
(package private) List | compileOutOfProcess(File workingDirectory, String executable, String[] args) - Compile the java sources in a external process, calling an external executable,
like javac.
|
String[] | createCommandLine(CompilerConfiguration config)
|
static CompilerError | parseModernError(String error) - Construct a CompilerError object from a line of the compiler output
|
protected static List | parseModernStream(BufferedReader input) - Parse the output from the compiler into a list of CompilerError objects
|
private static boolean | suppressEncoding(CompilerConfiguration config)
|
private static boolean | suppressSource(CompilerConfiguration config)
|
WARNING_PREFIX
private static final String WARNING_PREFIX
JavacCompiler
public JavacCompiler()
buildCompilerArguments
public static String[] buildCompilerArguments(CompilerConfiguration config,
String[] sourceFiles)
compile
public List compile(CompilerConfiguration config)
throws CompilerException
compileInProcess
(package private) List compileInProcess(String[] args)
throws CompilerException
Compile the java sources in the current JVM, without calling an external executable,
using com.sun.tools.javac.Main
class
args
- arguments for the compiler as they would be used in the command line javac
- List of CompilerError objects with the errors encountered.
compileOutOfProcess
(package private) List compileOutOfProcess(File workingDirectory,
String executable,
String[] args)
throws CompilerException
Compile the java sources in a external process, calling an external executable,
like javac.
workingDirectory
- base directory where the process will be launchedexecutable
- name of the executable to launchargs
- arguments for the executable launched
- List of CompilerError objects with the errors encountered.
createCommandLine
public String[] createCommandLine(CompilerConfiguration config)
throws CompilerException
parseModernError
public static CompilerError parseModernError(String error)
Construct a CompilerError object from a line of the compiler output
error
- output line from the compiler
parseModernStream
protected static List parseModernStream(BufferedReader input)
throws IOException
Parse the output from the compiler into a list of CompilerError objects
input
- The output of the compiler
- List of CompilerError objects
suppressEncoding
private static boolean suppressEncoding(CompilerConfiguration config)
suppressSource
private static boolean suppressSource(CompilerConfiguration config)