org.tempuri.javacImpl.eclipse
Class JavaCompilerImpl

java.lang.Object
  extended by org.tempuri.javacImpl.eclipse.JavaCompilerImpl
All Implemented Interfaces:
JavaCompiler

public class JavaCompilerImpl
extends java.lang.Object
implements JavaCompiler

Implementation of JavaCompiler with eclipse.org Java Development Tools compiler


Constructor Summary
JavaCompilerImpl()
           
 
Method Summary
 void compile(java.lang.String[] classNames, JavaSourceReaderFactory sourceReaderFactory, JavaClassReaderFactory classReaderFactory, JavaClassWriterFactory classWriterFactory, JavaCompilerErrorHandler errorHandler)
          Compile a set of source classes.
static java.lang.String makeClassName(java.lang.String name)
           
 void setDebug(boolean value)
          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"
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaCompilerImpl

public JavaCompilerImpl()
Method Detail

setTargetVersion

public void setTargetVersion(java.lang.String targetVersion)
                      throws java.lang.IllegalArgumentException
Description copied from interface: JavaCompiler
Choose the target Java platform version, e.g "1.2", "1.3", or "1.4"

Specified by:
setTargetVersion in interface JavaCompiler
Throws:
java.lang.IllegalArgumentException

setSourceEncoding

public void setSourceEncoding(java.lang.String encoding)
Description copied from interface: JavaCompiler
Set source encoding

Specified by:
setSourceEncoding in interface JavaCompiler

setDebug

public void setDebug(boolean value)
Description copied from interface: JavaCompiler
Choose whether the compiler should include the line number table and local variable table in generated class files

Specified by:
setDebug in interface JavaCompiler

setSourceVersion

public void setSourceVersion(java.lang.String sourceVersion)
                      throws java.lang.IllegalArgumentException
Description copied from interface: JavaCompiler
Choose the Java source version, e.g "1.2", "1.3", or "1.4"

Specified by:
setSourceVersion in interface JavaCompiler
Throws:
java.lang.IllegalArgumentException

makeClassName

public static java.lang.String makeClassName(java.lang.String name)

compile

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

Specified by:
compile in interface JavaCompiler
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