Sat, 01 Dec 2007 00:00:00 +0000
Initial load
1 /*
2 * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
26 package com.sun.tools.doclets.internal.toolkit;
28 import com.sun.javadoc.*;
29 import java.io.*;
31 /**
32 * The interface for writing serialized form output.
33 *
34 * This code is not part of an API.
35 * It is implementation that is subject to change.
36 * Do not use it as an API
37 *
38 * @author Jamie Ho
39 * @since 1.5
40 */
42 public interface SerializedFormWriter {
44 /**
45 * Write the given header.
46 *
47 * @param header the header to write.
48 */
49 public void writeHeader(String header);
51 /**
52 * Write the given package header.
53 *
54 * @param packageName the package header to write.
55 */
56 public void writePackageHeader(String packageName);
58 /**
59 * Write the heading for the serializable class.
60 *
61 * @param classDoc the class being processed.
62 */
63 public void writeClassHeader(ClassDoc classDoc);
65 /**
66 * Write the serial UID info.
67 *
68 * @param header the header that will show up before the UID.
69 * @param serialUID the serial UID to print.
70 */
71 public void writeSerialUIDInfo(String header, String serialUID);
73 /**
74 * Return an instance of a SerialFieldWriter.
75 *
76 * @return an instance of a SerialFieldWriter.
77 */
78 public SerialFieldWriter getSerialFieldWriter(ClassDoc classDoc);
80 /**
81 * Return an instance of a SerialMethodWriter.
82 *
83 * @return an instance of a SerialMethodWriter.
84 */
85 public SerialMethodWriter getSerialMethodWriter(ClassDoc classDoc);
87 /**
88 * Close the writer.
89 */
90 public abstract void close() throws IOException;
92 /**
93 * Write the footer.
94 */
95 public void writeFooter();
97 /**
98 * Write the serialized form for a given field.
99 */
100 public interface SerialFieldWriter {
102 /**
103 * Write the given heading.
104 *
105 * @param heading the heading to write.
106 */
107 public void writeHeader(String heading);
109 /**
110 * Write the deprecated information for this member.
111 *
112 * @param field the field to document.
113 */
114 public void writeMemberDeprecatedInfo(FieldDoc field);
116 /**
117 * Write the description text for this member.
118 *
119 * @param field the field to document.
120 */
121 public void writeMemberDescription(FieldDoc field);
123 /**
124 * Write the description text for this member represented by the tag.
125 *
126 * @param serialFieldTag the field to document (represented by tag).
127 */
128 public void writeMemberDescription(SerialFieldTag serialFieldTag);
130 /**
131 * Write the tag information for this member.
132 *
133 * @param field the field to document.
134 */
135 public void writeMemberTags(FieldDoc field);
137 /**
138 * Write the member header.
139 *
140 * @param fieldType the type of the field.
141 * @param fieldTypeStr the type of the field in string format. We will
142 * print this out if we can't link to the type.
143 * @param fieldDimensions the dimensions of the field.
144 * @param fieldName the name of the field.
145 */
146 public void writeMemberHeader(ClassDoc fieldType, String fieldTypeStr,
147 String fieldDimensions, String fieldName);
149 /**
150 * Write the footer.
151 *
152 * @param member the member to write the header for.
153 */
154 public void writeMemberFooter(FieldDoc member);
155 }
157 /**
158 * Write the serialized form for a given field.
159 */
160 public interface SerialMethodWriter {
162 /**
163 * Write the given heading.
164 *
165 * @param heading the heading to write.
166 */
167 public void writeHeader(String heading);
169 /**
170 * Write a warning that no serializable methods exist.
171 *
172 * @param msg the warning to print.
173 */
174 public void writeNoCustomizationMsg(String msg);
176 /**
177 * Write the header.
178 *
179 * @param member the member to write the header for.
180 */
181 public void writeMemberHeader(MethodDoc member);
183 /**
184 * Write the footer.
185 *
186 * @param member the member to write the header for.
187 */
188 public void writeMemberFooter(MethodDoc member);
190 /**
191 * Write the deprecated information for this member.
192 */
193 public void writeDeprecatedMemberInfo(MethodDoc member);
195 /**
196 * Write the description for this member.
197 */
198 public void writeMemberDescription(MethodDoc member);
200 /**
201 * Write the tag information for this member.
202 */
203 public void writeMemberTags(MethodDoc member);
204 }
205 }