submarine.pages.compiler
Class SunJavaCompiler

java.lang.Object
  |
  +--submarine.pages.compiler.SunJavaCompiler
All Implemented Interfaces:
JavaCompiler

public class SunJavaCompiler
extends java.lang.Object
implements JavaCompiler

The default compiler. This is the javac present in JDK 1.1.x and JDK 1.2. At some point we need to make sure there is a class like this for JDK 1.3, and other javac-like animals that people want to use.


Field Summary
(package private)  boolean classDebugInfo
           
(package private)  java.lang.String classpath
           
(package private)  java.lang.String compilerPath
           
(package private)  java.lang.String encoding
           
(package private)  java.io.OutputStream out
           
(package private)  java.lang.String outdir
           
 
Constructor Summary
SunJavaCompiler()
           
 
Method Summary
 boolean compile(java.lang.String source)
          Execute the compiler
 void setClassDebugInfo(boolean classDebugInfo)
          Set if you want debugging information in the class file
 void setClasspath(java.lang.String classpath)
          Set the class path for the compiler
 void setCompilerPath(java.lang.String compilerPath)
          Specify where the compiler can be found
 void setEncoding(java.lang.String encoding)
          Set the encoding (character set) of the source
 void setMsgOutput(java.io.OutputStream out)
          Set where you want the compiler output (messages) to go
 void setOut(java.io.OutputStream out)
          Set where you want the compiler output (messages) to go
 void setOutputDir(java.lang.String outdir)
          Set the output directory
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

encoding

java.lang.String encoding

classpath

java.lang.String classpath

compilerPath

java.lang.String compilerPath

outdir

java.lang.String outdir

out

java.io.OutputStream out

classDebugInfo

boolean classDebugInfo
Constructor Detail

SunJavaCompiler

public SunJavaCompiler()
Method Detail

setCompilerPath

public void setCompilerPath(java.lang.String compilerPath)
Specify where the compiler can be found
Specified by:
setCompilerPath in interface JavaCompiler

setEncoding

public void setEncoding(java.lang.String encoding)
Set the encoding (character set) of the source
Specified by:
setEncoding in interface JavaCompiler

setClasspath

public void setClasspath(java.lang.String classpath)
Set the class path for the compiler
Specified by:
setClasspath in interface JavaCompiler

setOutputDir

public void setOutputDir(java.lang.String outdir)
Set the output directory
Specified by:
setOutputDir in interface JavaCompiler

setMsgOutput

public void setMsgOutput(java.io.OutputStream out)
Set where you want the compiler output (messages) to go
Specified by:
setMsgOutput in interface JavaCompiler

setOut

public void setOut(java.io.OutputStream out)
Set where you want the compiler output (messages) to go

setClassDebugInfo

public void setClassDebugInfo(boolean classDebugInfo)
Set if you want debugging information in the class file
Specified by:
setClassDebugInfo in interface JavaCompiler

compile

public boolean compile(java.lang.String source)
Description copied from interface: JavaCompiler
Execute the compiler
Specified by:
compile in interface JavaCompiler
Following copied from interface: submarine.pages.compiler.JavaCompiler
Parameters:
source - - file name of the source to be compiled

Submarine project. free distribution of this software must include the opensource licence.
Guénolé de Cadoudal.