KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > gulden > util > javasource > sourclet > Sourclet


1 /*
2  * Project: BeautyJ - Customizable Java Source Code Transformer
3  * Class: de.gulden.util.javasource.sourclet.Sourclet
4  * Version: 1.0
5  *
6  * Date: 2002-10-27
7  *
8  * Note: Contains auto-generated Javadoc comments created by BeautyJ.
9  *
10  * This is licensed under the GNU General Public License (GPL)
11  * and comes with NO WARRANTY. See file license.txt for details.
12  *
13  * Author: Jens Gulden
14  * Email: beautyj@jensgulden.de
15  */

16
17 package de.gulden.util.javasource.sourclet;
18
19 import de.gulden.util.javasource.SourceObjectDeclared;
20 import de.gulden.framework.amoda.model.option.Options;
21 import java.io.*;
22 import java.util.Enumeration JavaDoc;
23
24 /**
25  * This is the pluggable Sourclet interface for customizing BeautyJ's output.
26  * Besides <code>init(..)</code>, the only method to be implemented is
27  * <code>buildSource(..)</code>, which handles all the conversion
28  * from SourceObjects to Java source code.<br>
29  * See <code>AbstractSourclet</code> for a further refined model of the process of generating
30  * Java source code, and <code>StandardSourclet</code> for a full implementation.
31  *
32  * @author Jens Gulden
33  * @version 1.0
34  * @see de.gulden.util.javasource.sourclet.AbstractSourclet
35  * @see de.gulden.util.javasource.sourclet.standard.StandardSourclet
36  */

37 public interface Sourclet {
38
39     // ------------------------------------------------------------------------
40
// --- methods ---
41
// ------------------------------------------------------------------------
42
/**
43      * Initializes the Sourclet. This is called once before the
44      * first SourceObject's code is being generated.
45      */

46     public void init(SourcletOptions options);
47
48     /**
49      * Outputs the source code for an entire SourceObject to an OutputStream.
50      *
51      * @throws IOException if an i/o error occurs
52      */

53     public void buildSource(OutputStream out, SourceObjectDeclared o) throws IOException;
54
55 } // end Sourclet
56
Popular Tags