org.inxar.hotswap
Class SystemCompiler

java.lang.Object
  |
  +--org.inxar.hotswap.ProxyCompiler
        |
        +--org.inxar.hotswap.SystemCompiler
All Implemented Interfaces:
org.inxar.hotswap.PriorityQueue.Listener

public class SystemCompiler
extends ProxyCompiler

Concrete ProxyCompiler implementation that executes a compilation command through Runtime.exec.

Constructor usage of SystemCompiler
 ProxyCompiler compiler = new SystemCompiler();
 compiler.setProxyClassLoader(loader);

 compiler.setCommandName("javac");
 compiler.setCommandName("jikes");
 compiler.setCommandName("/usr/local/jdk1.2.2/javac");
 compiler.setCommandName("/usr/bin/jikes");
 

Since:
0.8.2, renamed in 0.8.6

Fields inherited from class org.inxar.hotswap.ProxyCompiler
COMPILE_FAILURE, COMPILE_SUCCESS, COMPILE_UNKNOWN, STATUS_COMPILE, STATUS_CURRENT, STATUS_ERROR, STATUS_LOAD, STATUS_UNKNOWN, STATUS_WARN
 
Constructor Summary
SystemCompiler()
          Constructs a new ProxyCompiler having a default ClassLoader.
 
Method Summary
 ProxyCompileEvent compile(ProxyClass cls)
          Compiles the class associated with the given ProxyClass.
 boolean initialize(Properties p)
          Initializes the ProxyCompiler instance from the given Properties.
 void setCommandName(String commandName)
          Sets the command name of the system compiler, for example "/usr/bin/jikes" or "javac".
 
Methods inherited from class org.inxar.hotswap.ProxyCompiler
addCompileListener, getClassfile, getClasspath, getDestinationpath, getOptions, getSourcefile, getSourcepath, getStatus, queue_notify, removeCompileListener, setDestinationpath, setProxyClassLoader, setSourcepath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemCompiler

public SystemCompiler()
Constructs a new ProxyCompiler having a default ClassLoader.
Method Detail

initialize

public boolean initialize(Properties p)
Description copied from class: ProxyCompiler
Initializes the ProxyCompiler instance from the given Properties. If initialization was unsuccessful, return false.
Overrides:
initialize in class ProxyCompiler

setCommandName

public void setCommandName(String commandName)
Sets the command name of the system compiler, for example "/usr/bin/jikes" or "javac".

compile

public ProxyCompileEvent compile(ProxyClass cls)
Description copied from class: ProxyCompiler
Compiles the class associated with the given ProxyClass.
Overrides:
compile in class ProxyCompiler