public interface Compiler
Modifier and Type | Method and Description |
---|---|
void |
addFile(String file)
Set the name of the file containing the source program
|
boolean |
compile()
Compile a source file yielding a loadable program file.
|
List |
getErrors()
Return the list of errors generated by this compilation
|
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
|
void addFile(String file)
file
- The name of the file containing the source programvoid setSource(String srcDir)
srcDir
- The name of the directory containing the source program filevoid setDestination(String destDir)
destDir
- The name of the directory to contain the resulting object
program filevoid setClasspath(String classpath)
classpath
- The classpath to be used for this compilationvoid setEncoding(String encoding)
null
to use the
platform's default encodingencoding
- The encoding of the input source file or null
to use the platform's default encodingboolean compile() throws IOException
filename
- The object program base file namebaseDirectory
- The directory containing the object program fileencoding
- The encoding expected in the source file or
null
if it is the platform's default encodingLanguageException
- If an error occurs during compilationIOException
List getErrors() throws IOException
IOException
- If an error occurs during message collectionCopyright © The Apache Software Foundation. All Rights Reserved.