01: /*
02: * @(#)ClassFileHandler.java 1.2 04/12/06
03: *
04: * Copyright (c) 1997-2003 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.compiler;
10:
11: /**
12: * This interface defines an abstract interface to get a result of compilation.
13: * This interface is used by the following methods.
14: * <ul>
15: * <li>Compiler.compile(Pnuts, ClassFileHandler)
16: * <li>Compiler.compile(String, ClassFileHandler)
17: * <li>Compiler.compile(PnutsFunction, ClassFileHandler)
18: * </ul>
19: */
20: public interface ClassFileHandler {
21:
22: /**
23: * This method is called with each compiled class file when
24: * Compiler.compile(Pnuts, ClassFileHandler) method is called. The first
25: * class file is supposed to be of pnuts.lang.Executable subclass. The
26: * compiled code can be executed with Executable.run(Context) method.
27: */
28: public Object handle(ClassFile cf);
29: }
|