author | bpatel |
Wed, 18 Feb 2009 13:47:27 -0800 | |
changeset 2086 | cca2603eab0b |
parent 10 | 06bc494ca11e |
child 2216 | b124d5c924eb |
child 2212 | 1d3dc0e0ba0c |
permissions | -rw-r--r-- |
10 | 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 |
*/ |
|
25 |
||
26 |
package com.sun.tools.doclets.internal.toolkit; |
|
27 |
||
28 |
import com.sun.javadoc.*; |
|
29 |
import java.io.*; |
|
30 |
||
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 |
*/ |
|
41 |
||
42 |
public interface SerializedFormWriter { |
|
43 |
||
44 |
/** |
|
45 |
* Write the given header. |
|
46 |
* |
|
47 |
* @param header the header to write. |
|
48 |
*/ |
|
49 |
public void writeHeader(String header); |
|
50 |
||
51 |
/** |
|
52 |
* Write the given package header. |
|
53 |
* |
|
54 |
* @param packageName the package header to write. |
|
55 |
*/ |
|
56 |
public void writePackageHeader(String packageName); |
|
57 |
||
58 |
/** |
|
59 |
* Write the heading for the serializable class. |
|
60 |
* |
|
61 |
* @param classDoc the class being processed. |
|
62 |
*/ |
|
63 |
public void writeClassHeader(ClassDoc classDoc); |
|
64 |
||
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); |
|
72 |
||
73 |
/** |
|
74 |
* Return an instance of a SerialFieldWriter. |
|
75 |
* |
|
76 |
* @return an instance of a SerialFieldWriter. |
|
77 |
*/ |
|
78 |
public SerialFieldWriter getSerialFieldWriter(ClassDoc classDoc); |
|
79 |
||
80 |
/** |
|
81 |
* Return an instance of a SerialMethodWriter. |
|
82 |
* |
|
83 |
* @return an instance of a SerialMethodWriter. |
|
84 |
*/ |
|
85 |
public SerialMethodWriter getSerialMethodWriter(ClassDoc classDoc); |
|
86 |
||
87 |
/** |
|
88 |
* Close the writer. |
|
89 |
*/ |
|
90 |
public abstract void close() throws IOException; |
|
91 |
||
92 |
/** |
|
93 |
* Write the footer. |
|
94 |
*/ |
|
95 |
public void writeFooter(); |
|
96 |
||
97 |
/** |
|
98 |
* Write the serialized form for a given field. |
|
99 |
*/ |
|
100 |
public interface SerialFieldWriter { |
|
101 |
||
102 |
/** |
|
103 |
* Write the given heading. |
|
104 |
* |
|
105 |
* @param heading the heading to write. |
|
106 |
*/ |
|
107 |
public void writeHeader(String heading); |
|
108 |
||
109 |
/** |
|
110 |
* Write the deprecated information for this member. |
|
111 |
* |
|
112 |
* @param field the field to document. |
|
113 |
*/ |
|
114 |
public void writeMemberDeprecatedInfo(FieldDoc field); |
|
115 |
||
116 |
/** |
|
117 |
* Write the description text for this member. |
|
118 |
* |
|
119 |
* @param field the field to document. |
|
120 |
*/ |
|
121 |
public void writeMemberDescription(FieldDoc field); |
|
122 |
||
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); |
|
129 |
||
130 |
/** |
|
131 |
* Write the tag information for this member. |
|
132 |
* |
|
133 |
* @param field the field to document. |
|
134 |
*/ |
|
135 |
public void writeMemberTags(FieldDoc field); |
|
136 |
||
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); |
|
148 |
||
149 |
/** |
|
150 |
* Write the footer. |
|
151 |
* |
|
152 |
* @param member the member to write the header for. |
|
153 |
*/ |
|
154 |
public void writeMemberFooter(FieldDoc member); |
|
2086
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
155 |
|
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
156 |
/** |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
157 |
* Check to see if member details should be printed. If |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
158 |
* nocomment option set or if there is no text to be printed |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
159 |
* for deprecation info, inline comment, no serial tag or inline tags, |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
160 |
* do not print member details. |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
161 |
* |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
162 |
* @param member the member to check details for. |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
163 |
* @return true if details need to be printed |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
164 |
*/ |
cca2603eab0b
6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
bpatel
parents:
10
diff
changeset
|
165 |
public boolean shouldPrintMemberDetails(FieldDoc member); |
10 | 166 |
} |
167 |
||
168 |
/** |
|
169 |
* Write the serialized form for a given field. |
|
170 |
*/ |
|
171 |
public interface SerialMethodWriter { |
|
172 |
||
173 |
/** |
|
174 |
* Write the given heading. |
|
175 |
* |
|
176 |
* @param heading the heading to write. |
|
177 |
*/ |
|
178 |
public void writeHeader(String heading); |
|
179 |
||
180 |
/** |
|
181 |
* Write a warning that no serializable methods exist. |
|
182 |
* |
|
183 |
* @param msg the warning to print. |
|
184 |
*/ |
|
185 |
public void writeNoCustomizationMsg(String msg); |
|
186 |
||
187 |
/** |
|
188 |
* Write the header. |
|
189 |
* |
|
190 |
* @param member the member to write the header for. |
|
191 |
*/ |
|
192 |
public void writeMemberHeader(MethodDoc member); |
|
193 |
||
194 |
/** |
|
195 |
* Write the footer. |
|
196 |
* |
|
197 |
* @param member the member to write the header for. |
|
198 |
*/ |
|
199 |
public void writeMemberFooter(MethodDoc member); |
|
200 |
||
201 |
/** |
|
202 |
* Write the deprecated information for this member. |
|
203 |
*/ |
|
204 |
public void writeDeprecatedMemberInfo(MethodDoc member); |
|
205 |
||
206 |
/** |
|
207 |
* Write the description for this member. |
|
208 |
*/ |
|
209 |
public void writeMemberDescription(MethodDoc member); |
|
210 |
||
211 |
/** |
|
212 |
* Write the tag information for this member. |
|
213 |
*/ |
|
214 |
public void writeMemberTags(MethodDoc member); |
|
215 |
} |
|
216 |
} |