Class Javac
- java.lang.Object
-
- org.apache.axis.components.compiler.AbstractCompiler
-
- org.apache.axis.components.compiler.Javac
-
- 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 Summary
Fields Modifier and Type Field Description static java.lang.String
CLASSIC_CLASS
protected static org.apache.commons.logging.Log
log
static java.lang.String
MODERN_CLASS
-
Constructor Summary
Constructors Constructor Description Javac()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compile()
Compile a source file yielding a loadable class file.protected java.util.List
parseClassicStream(java.io.BufferedReader input)
Parse the compiler error stream to produce a list ofCompilerError
sprotected java.util.List
parseModernStream(java.io.BufferedReader input)
Parse the compiler error stream to produce a list ofCompilerError
sprotected java.util.List
parseStream(java.io.BufferedReader input)
Parse the compiler error stream to produce a list ofCompilerError
sjava.lang.String
toString()
-
Methods inherited from class org.apache.axis.components.compiler.AbstractCompiler
addFile, fillArguments, getErrors, setClasspath, setDestination, setEncoding, setSource, toStringArray
-
-
-
-
Field Detail
-
log
protected static org.apache.commons.logging.Log log
-
CLASSIC_CLASS
public static final java.lang.String CLASSIC_CLASS
- See Also:
- Constant Field Values
-
MODERN_CLASS
public static final java.lang.String MODERN_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
compile
public boolean compile() throws java.io.IOException
Compile a source file yielding a loadable class file.- Throws:
java.io.IOException
- If an error occurs during compilation
-
parseStream
protected java.util.List parseStream(java.io.BufferedReader input) throws java.io.IOException
Parse the compiler error stream to produce a list ofCompilerError
s- Specified by:
parseStream
in classAbstractCompiler
- Parameters:
input
- The error stream- Returns:
- The list of compiler error messages
- Throws:
java.io.IOException
- If an error occurs during message collection
-
parseModernStream
protected java.util.List parseModernStream(java.io.BufferedReader input) throws java.io.IOException
Parse the compiler error stream to produce a list ofCompilerError
s- Parameters:
input
- The error stream- Returns:
- The list of compiler error messages
- Throws:
java.io.IOException
- If an error occurs during message collection
-
parseClassicStream
protected java.util.List parseClassicStream(java.io.BufferedReader input) throws java.io.IOException
Parse the compiler error stream to produce a list ofCompilerError
s- Parameters:
input
- The error stream- Returns:
- The list of compiler error messages
- Throws:
java.io.IOException
- If an error occurs during message collection
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-