org.tempuri.javac
Interface JavaCompiler

All Known Implementing Classes:
JavaCompilerImpl

public interface JavaCompiler

Generic interface to a Java compilation system


Method Summary
 void compile(java.lang.String[] classNames, JavaSourceReaderFactory sourceReaderFactory, JavaClassReaderFactory classReaderFactory, JavaClassWriterFactory classWriterFactory, JavaCompilerErrorHandler errorHandler)
          Compile a set of source classes.
 void setDebug(boolean debug)
          Choose whether the compiler should include the line number table and local variable table in generated class files
 void setSourceEncoding(java.lang.String encoding)
          Set source encoding
 void setSourceVersion(java.lang.String sourceVersion)
          Choose the Java source version, e.g "1.2", "1.3", or "1.4"
 void setTargetVersion(java.lang.String targetVersion)
          Choose the target Java platform version, e.g "1.2", "1.3", or "1.4"
 

Method Detail

setTargetVersion

void setTargetVersion(java.lang.String targetVersion)
                      throws java.lang.IllegalArgumentException
Choose the target Java platform version, e.g "1.2", "1.3", or "1.4"

Parameters:
targetVersion -
Throws:
java.lang.IllegalArgumentException

setSourceVersion

void setSourceVersion(java.lang.String sourceVersion)
                      throws java.lang.IllegalArgumentException
Choose the Java source version, e.g "1.2", "1.3", or "1.4"

Parameters:
sourceVersion -
Throws:
java.lang.IllegalArgumentException

setDebug

void setDebug(boolean debug)
Choose whether the compiler should include the line number table and local variable table in generated class files

Parameters:
debug -

setSourceEncoding

void setSourceEncoding(java.lang.String encoding)
Set source encoding

Parameters:
encoding -

compile

void compile(java.lang.String[] classNames,
             JavaSourceReaderFactory sourceReaderFactory,
             JavaClassReaderFactory classReaderFactory,
             JavaClassWriterFactory classWriterFactory,
             JavaCompilerErrorHandler errorHandler)
Compile a set of source classes. The compiler will attempt to compile the transitive closure of all classes in this set.

Parameters:
classNames - list of classes to be compiled
sourceReaderFactory - object used by compiler to locate source code
classReaderFactory - object used by compiler to locate existing compiled classes
classWriterFactory - object used by compiler to handle generated classes
errorHandler - object used by compiler to handle errors