pnuts.compiler
Interface ClassFileHandler
- All Known Implementing Classes:
- ZipWriterHandler, FileWriterHandler
- public interface ClassFileHandler
This interface defines an abstract interface to get a
result of compilation. This interface is used by the following methods.
- Compiler.compile(Pnuts, ClassFileHandler)
- Compiler.compile(String, ClassFileHandler)
- Compiler.compile(PnutsFunction, ClassFileHandler)
Method Summary |
java.lang.Object |
getResult(CompileContext cc)
This method is called when all class files are handled. |
void |
handle(CompileContext cc,
ClassFile cf)
This method is called with each compiled class file when
Compiler.compile(Pnuts, ClassFileHandler) method is called. |
handle
public void handle(CompileContext cc,
ClassFile cf)
- 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.
getResult
public java.lang.Object getResult(CompileContext cc)
- 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).