org.apache.axis.components.compiler
Class AbstractCompiler
java.lang.Object
org.apache.axis.components.compiler.AbstractCompiler
- Compiler
public abstract class AbstractCompiler
extends java.lang.Object
This class implements the functionality common to all Java compilers.
protected String | classpath - The classpath to be used for compilation
|
protected String | destDir - The name of the directory to contain the resulting object program file
|
protected String | encoding - The encoding of the source program or
null to use the
platform's default encoding
|
protected InputStream | errors - The input stream to output compilation errors
|
protected ArrayList | fileList - The source program filenames
|
protected String | srcDir - The name of the directory containing the source program file
|
void | addFile(String file) - Add the name of the file containing the source program to the file list
|
protected List | fillArguments(List arguments) - Fill the arguments taken by the Java compiler
|
List | getErrors() - Return the list of errors generated by this compilation
|
protected abstract List | parseStream(BufferedReader errors) - Parse the compiler error stream to produce a list of
CompilerError s
|
void | setClasspath(String classpath) - Set the classpath to be used for this compilation
|
void | setDestination(String destDir) - Set the name of the directory to contain the resulting object program file
|
void | setEncoding(String encoding) - Set the encoding of the input source file or
null to use the
platform's default encoding
|
void | setSource(String srcDir) - Set the name of the directory containing the source program file
|
protected String[] | toStringArray(List arguments) - Copy arguments to a string array
|
classpath
protected String classpath
The classpath to be used for compilation
destDir
protected String destDir
The name of the directory to contain the resulting object program file
encoding
protected String encoding
The encoding of the source program or null
to use the
platform's default encoding
errors
protected InputStream errors
The input stream to output compilation errors
fileList
protected ArrayList fileList
The source program filenames
srcDir
protected String srcDir
The name of the directory containing the source program file
addFile
public void addFile(String file)
Add the name of the file containing the source program to the file list
- addFile in interface Compiler
file
- The name of the file containing the source program
fillArguments
protected List fillArguments(List arguments)
Fill the arguments taken by the Java compiler
arguments
- The list of compilation arguments
- The prepared list of compilation arguments
getErrors
public List getErrors()
throws IOException
Return the list of errors generated by this compilation
- getErrors in interface Compiler
- The list of errors generated by this compilation
parseStream
protected abstract List parseStream(BufferedReader errors)
throws IOException
Parse the compiler error stream to produce a list of
CompilerError
s
errors
- The error stream
- The list of compiler error messages
setClasspath
public void setClasspath(String classpath)
Set the classpath to be used for this compilation
- setClasspath in interface Compiler
classpath
- The classpath to be used for this compilation
setDestination
public void setDestination(String destDir)
Set the name of the directory to contain the resulting object program file
- setDestination in interface Compiler
destDir
- The name of the directory to contain the resulting object
program file
setEncoding
public void setEncoding(String encoding)
Set the encoding of the input source file or null
to use the
platform's default encoding
- setEncoding in interface Compiler
encoding
- The encoding of the input source file or null
to use the platform's default encoding
setSource
public void setSource(String srcDir)
Set the name of the directory containing the source program file
- setSource in interface Compiler
srcDir
- The name of the directory containing the source program file
toStringArray
protected String[] toStringArray(List arguments)
Copy arguments to a string array
arguments
- The compiler arguments
- A string array containing compilation arguments
Copyright © 2005 Apache Web Services Project. All Rights Reserved.