pnuts.compiler
Class ZipWriterHandler
java.lang.Object
|
+--pnuts.compiler.ZipWriterHandler
- All Implemented Interfaces:
- ClassFileHandler
- public class ZipWriterHandler
- 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 added to the ZipOutputStream specified with the constructor.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipWriterHandler
public ZipWriterHandler(java.util.zip.ZipOutputStream zout)
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