com.caucho.java
Class ExternalCompiler

java.lang.Object
  extended by com.caucho.java.AbstractJavaCompiler
      extended by com.caucho.java.ExternalCompiler
All Implemented Interfaces:
java.lang.Runnable

public class ExternalCompiler
extends AbstractJavaCompiler

Compiles Java source, returning the loaded class.


Nested Class Summary
static class ExternalCompiler.CompilerThread
           
 
Field Summary
protected static java.util.logging.Logger log
           
 
Fields inherited from class com.caucho.java.AbstractJavaCompiler
_compiler, L
 
Constructor Summary
ExternalCompiler(JavaCompilerUtil compiler)
           
 
Method Summary
 void abort()
          Aborts the compilation.
protected  void compileInt(java.lang.String[] paths, LineMap lineMap)
          Compile the configured file.
 void handleAlarm(Alarm alarm)
          This callback should only occur if the compiler freezes.
 
Methods inherited from class com.caucho.java.AbstractJavaCompiler
getException, isDone, notifyComplete, run, setLineMap, setPath, waitForComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

ExternalCompiler

public ExternalCompiler(JavaCompilerUtil compiler)
Method Detail

compileInt

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

Specified by:
compileInt in class AbstractJavaCompiler
Parameters:
path - the path to the java source.
lineMap - mapping from the generated source to the original files.
Throws:
java.io.IOException

handleAlarm

public void handleAlarm(Alarm alarm)
This callback should only occur if the compiler freezes. In that case we immediately kill the process.

Parameters:
alarm - the alarm we've been waiting for.

abort

public void abort()
Aborts the compilation.

Overrides:
abort in class AbstractJavaCompiler