org.apache.axis.components.compiler
public abstract class AbstractCompiler extends java.lang.Object implements Compiler
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
classpath
The classpath to be used for compilation
|
protected java.lang.String |
destDir
The name of the directory to contain the resulting object program file
|
protected java.lang.String |
encoding
The encoding of the source program or
null to use the
platform's default encoding |
protected java.io.InputStream |
errors
The input stream to output compilation errors
|
protected java.util.ArrayList |
fileList
The source program filenames
|
protected java.lang.String |
srcDir
The name of the directory containing the source program file
|
Constructor and Description |
---|
AbstractCompiler() |
Modifier and Type | Method and Description |
---|---|
void |
addFile(java.lang.String file)
Add the name of the file containing the source program to the file list
|
protected java.util.List |
fillArguments(java.util.List arguments)
Fill the arguments taken by the Java compiler
|
java.util.List |
getErrors()
Return the list of errors generated by this compilation
|
protected abstract java.util.List |
parseStream(java.io.BufferedReader errors)
Parse the compiler error stream to produce a list of
CompilerError s |
void |
setClasspath(java.lang.String classpath)
Set the classpath to be used for this compilation
|
void |
setDestination(java.lang.String destDir)
Set the name of the directory to contain the resulting object program file
|
void |
setEncoding(java.lang.String encoding)
Set the encoding of the input source file or
null to use the
platform's default encoding |
void |
setSource(java.lang.String srcDir)
Set the name of the directory containing the source program file
|
protected java.lang.String[] |
toStringArray(java.util.List arguments)
Copy arguments to a string array
|
protected java.util.ArrayList fileList
protected java.lang.String srcDir
protected java.lang.String destDir
protected java.lang.String classpath
protected java.lang.String encoding
null
to use the
platform's default encodingprotected java.io.InputStream errors
public void addFile(java.lang.String file)
public void setSource(java.lang.String srcDir)
public void setDestination(java.lang.String destDir)
setDestination
in interface Compiler
destDir
- The name of the directory to contain the resulting object
program filepublic void setClasspath(java.lang.String classpath)
setClasspath
in interface Compiler
classpath
- The classpath to be used for this compilationpublic void setEncoding(java.lang.String encoding)
null
to use the
platform's default encodingsetEncoding
in interface Compiler
encoding
- The encoding of the input source file or null
to use the platform's default encodingpublic java.util.List getErrors() throws java.io.IOException
protected abstract java.util.List parseStream(java.io.BufferedReader errors) throws java.io.IOException
CompilerError
serrors
- The error streamjava.io.IOException
- If an error occurs during message collectionprotected java.util.List fillArguments(java.util.List arguments)
arguments
- The list of compilation argumentsprotected java.lang.String[] toStringArray(java.util.List arguments)
arguments
- The compiler argumentsCopyright ? 2005 Apache Web Services Project. All Rights Reserved.