com.caucho.java
Class AbstractJavaCompiler

java.lang.Object
  extended by com.caucho.java.AbstractJavaCompiler
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
EclipseCompiler, ExternalCompiler, GroovyCompiler, InternalCompiler, InternalCompiler2, InternalCompilerTools

public abstract class AbstractJavaCompiler
extends java.lang.Object
implements java.lang.Runnable

Compiles Java source, returning the loaded class.


Field Summary
protected  JavaCompilerUtil _compiler
           
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
AbstractJavaCompiler(JavaCompilerUtil compiler)
           
 
Method Summary
 void abort()
          Quit the compilation.
protected abstract  void compileInt(java.lang.String[] path, LineMap lineMap)
          Compile the configured file.
 java.lang.Throwable getException()
          Returns any compile exception.
 boolean isDone()
          Returns true when the compilation is done.
protected  void notifyComplete()
           
 void run()
          runs the compiler.
 void setLineMap(LineMap lineMap)
          Sets the LineMap for the file
 void setPath(java.lang.String[] path)
          Sets the path of files to compile.
protected  void waitForComplete(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

protected static final L10N L

log

protected static final java.util.logging.Logger log

_compiler

protected JavaCompilerUtil _compiler
Constructor Detail

AbstractJavaCompiler

public AbstractJavaCompiler(JavaCompilerUtil compiler)
Method Detail

setPath

public void setPath(java.lang.String[] path)
Sets the path of files to compile.


setLineMap

public void setLineMap(LineMap lineMap)
Sets the LineMap for the file


getException

public java.lang.Throwable getException()
Returns any compile exception.


isDone

public boolean isDone()
Returns true when the compilation is done.


run

public void run()
runs the compiler.

Specified by:
run in interface java.lang.Runnable

waitForComplete

protected void waitForComplete(long timeout)

notifyComplete

protected void notifyComplete()

abort

public void abort()
Quit the compilation.


compileInt

protected abstract void compileInt(java.lang.String[] path,
                                   LineMap lineMap)
                            throws java.io.IOException
Compile the configured file.

Parameters:
path - the path to the java source.
lineMap - mapping from the generated source to the original files.
Throws:
java.io.IOException