KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > gulden > util > javasource > Documentation


1 /*
2  * Project: BeautyJ - Customizable Java Source Code Transformer
3  * Class: de.gulden.util.javasource.Documentation
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;
18
19 import de.gulden.util.javasource.jjt.Node;
20 import de.gulden.util.javasource.jjt.*;
21 import javax.xml.parsers.*;
22 import org.w3c.dom.*;
23 import java.util.*;
24
25 /**
26  * Class Documentation.
27  *
28  * @author Jens Gulden
29  * @version 1.0
30  */

31 public abstract class Documentation extends Implementation implements ParserTreeConstants {
32
33     // ------------------------------------------------------------------------
34
// --- field ---
35
// ------------------------------------------------------------------------
36
/**
37      * The text.
38      */

39     protected String JavaDoc text;
40
41
42     // ------------------------------------------------------------------------
43
// --- constructor ---
44
// ------------------------------------------------------------------------
45
/**
46      * Creates a new instance of Documentation.
47      */

48     public Documentation() {
49
50     }
51
52
53     // ------------------------------------------------------------------------
54
// --- methods ---
55
// ------------------------------------------------------------------------
56
/**
57      * Returns the text.
58      */

59     public String JavaDoc getText() {
60         return text;
61     }
62
63     /**
64      * Sets the text.
65      */

66     public void setText(String JavaDoc s) {
67         text=s;
68     }
69
70     /**
71      * Output this object as XML.
72      *
73      * @return The XML tag.
74      * @see #initFromXML
75      */

76     public Element buildXML(Document d) {
77                 Element e=d.createElement("documentation");
78         e.appendChild(d.createTextNode(getText()));
79         return e;
80     }
81
82     public String JavaDoc toString() {
83         return "documentation "+getText();
84     }
85
86 } // end Documentation
87
Popular Tags