pnuts.compiler
Class FileWriterHandler
java.lang.Object
|
+--pnuts.compiler.FileWriterHandler
- public class FileWriterHandler
- extends java.lang.Object
- implements ClassFileHandler
This class is a concrete class of ClassFileHandler.
When this is passed to Compiler.compile(..., ClassFileHandler),
compiled class files are saved in the directory specified with the constructor.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FileWriterHandler
public FileWriterHandler(java.io.File dir)
setVerbose
public void setVerbose(boolean flag)
handle
public void handle(CompileContext cc,
ClassFile cf)
- Description copied from interface: ClassFileHandler
- This method is called with each compiled class file when
Compiler.compile(Pnuts, ClassFileHandler) method is called.
The first class file is supposed to be of pnuts.lang.Runtime
subclass. The compiled code can be executed with
Runtime.execute(Context) method.
- Specified by:
- handle in interface ClassFileHandler
getResult
public java.lang.Object getResult(CompileContext cc)
- Description copied from interface: ClassFileHandler
- This method is called when all class files are handled.
The returned object will be the result of the method call,
Compiler.compile(Pnuts, ClassFileHandler).
- Specified by:
- getResult in interface ClassFileHandler