01: /*
02: * Project: BeautyJ - Customizable Java Source Code Transformer
03: * Class: de.gulden.util.javasource.Documentation
04: * Version: 1.0
05: *
06: * Date: 2002-10-27
07: *
08: * Note: Contains auto-generated Javadoc comments created by BeautyJ.
09: *
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
32: ParserTreeConstants {
33:
34: // ------------------------------------------------------------------------
35: // --- field ---
36: // ------------------------------------------------------------------------
37: /**
38: * The text.
39: */
40: protected String text;
41:
42: // ------------------------------------------------------------------------
43: // --- constructor ---
44: // ------------------------------------------------------------------------
45: /**
46: * Creates a new instance of Documentation.
47: */
48: public Documentation() {
49:
50: }
51:
52: // ------------------------------------------------------------------------
53: // --- methods ---
54: // ------------------------------------------------------------------------
55: /**
56: * Returns the text.
57: */
58: public String getText() {
59: return text;
60: }
61:
62: /**
63: * Sets the text.
64: */
65: public void setText(String s) {
66: text = s;
67: }
68:
69: /**
70: * Output this object as XML.
71: *
72: * @return The XML tag.
73: * @see #initFromXML
74: */
75: public Element buildXML(Document d) {
76: Element e = d.createElement("documentation");
77: e.appendChild(d.createTextNode(getText()));
78: return e;
79: }
80:
81: public String toString() {
82: return "documentation " + getText();
83: }
84:
85: } // end Documentation
|