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.
Method Summary |
java.lang.Object |
handle(ClassFile cf)
This method is called with each compiled class file when
Compiler.compile(Pnuts, ClassFileHandler) method is called. |
protected void |
handleException(java.lang.Exception e)
|
void |
setVerbose(boolean flag)
|
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)
handleException
protected void handleException(java.lang.Exception e)
handle
public java.lang.Object handle(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.Executable subclass. The
compiled code can be executed with Executable.run(Context) method.
- Specified by:
handle
in interface ClassFileHandler