41 */ |
41 */ |
42 |
42 |
43 public interface SerializedFormWriter { |
43 public interface SerializedFormWriter { |
44 |
44 |
45 /** |
45 /** |
46 * Write the given header. |
46 * Get the header. |
47 * |
47 * |
48 * @param header the header to write. |
48 * @param header the header to write. |
49 */ |
49 * @return the header content tree |
50 public void writeHeader(String header); |
50 */ |
51 |
51 public Content getHeader(String header); |
52 /** |
52 |
53 * Write the given package header. |
53 /** |
54 * |
54 * Get the serialized form summaries header. |
55 * @param packageName the package header to write. |
55 * |
56 */ |
56 * @return the serialized form summary header tree |
57 public void writePackageHeader(String packageName); |
57 */ |
58 |
58 public Content getSerializedSummariesHeader(); |
59 /** |
59 |
60 * Write the heading for the serializable class. |
60 /** |
61 * |
61 * Get the package serialized form header. |
62 * @param classDoc the class being processed. |
62 * |
63 */ |
63 * @return the package serialized form header tree |
64 public void writeClassHeader(ClassDoc classDoc); |
64 */ |
65 |
65 public Content getPackageSerializedHeader(); |
66 /** |
66 |
67 * Write the serial UID info. |
67 /** |
|
68 * Get the given package header. |
|
69 * |
|
70 * @param packageName the package header to write |
|
71 * @return a content tree for the package header |
|
72 */ |
|
73 public Content getPackageHeader(String packageName); |
|
74 |
|
75 /** |
|
76 * Get the serialized class header. |
|
77 * |
|
78 * @return a content tree for the serialized class header |
|
79 */ |
|
80 public Content getClassSerializedHeader(); |
|
81 |
|
82 /** |
|
83 * Get the heading for the serializable class. |
|
84 * |
|
85 * @param classDoc the class being processed |
|
86 * @return a content tree for the class heading |
|
87 */ |
|
88 public Content getClassHeader(ClassDoc classDoc); |
|
89 |
|
90 /** |
|
91 * Get the serial UID info header. |
|
92 * |
|
93 * @return a content tree for the serial uid info header |
|
94 */ |
|
95 public Content getSerialUIDInfoHeader(); |
|
96 |
|
97 /** |
|
98 * Adds the serial UID info. |
68 * |
99 * |
69 * @param header the header that will show up before the UID. |
100 * @param header the header that will show up before the UID. |
70 * @param serialUID the serial UID to print. |
101 * @param serialUID the serial UID to print. |
71 */ |
102 * @param serialUidTree the serial UID tree to which the content will be added. |
72 public void writeSerialUIDInfo(String header, String serialUID); |
103 */ |
|
104 public void addSerialUIDInfo(String header, String serialUID, |
|
105 Content serialUidTree); |
|
106 |
|
107 /** |
|
108 * Get the class serialize content header. |
|
109 * |
|
110 * @return a content tree for the class serialize content header |
|
111 */ |
|
112 public Content getClassContentHeader(); |
73 |
113 |
74 /** |
114 /** |
75 * Return an instance of a SerialFieldWriter. |
115 * Return an instance of a SerialFieldWriter. |
76 * |
116 * |
77 * @return an instance of a SerialFieldWriter. |
117 * @return an instance of a SerialFieldWriter. |
89 * Close the writer. |
129 * Close the writer. |
90 */ |
130 */ |
91 public abstract void close() throws IOException; |
131 public abstract void close() throws IOException; |
92 |
132 |
93 /** |
133 /** |
94 * Write the footer. |
134 * Get the serialized content. |
95 */ |
135 * |
96 public void writeFooter(); |
136 * @param serializedTreeContent content for serialized data |
|
137 * @return a content tree for serialized information |
|
138 */ |
|
139 public Content getSerializedContent(Content serializedTreeContent); |
|
140 |
|
141 /** |
|
142 * Add the footer. |
|
143 * |
|
144 * @param serializedTree the serialized tree to be added |
|
145 */ |
|
146 public void addFooter(Content serializedTree); |
|
147 |
|
148 /** |
|
149 * Print the serialized form document. |
|
150 * |
|
151 * @param serializedTree the content tree that will be printed |
|
152 */ |
|
153 public abstract void printDocument(Content serializedTree); |
97 |
154 |
98 /** |
155 /** |
99 * Write the serialized form for a given field. |
156 * Write the serialized form for a given field. |
100 */ |
157 */ |
101 public interface SerialFieldWriter { |
158 public interface SerialFieldWriter { |
102 |
159 |
103 /** |
160 /** |
104 * Write the given heading. |
161 * Get the serializable field header. |
|
162 * |
|
163 * @return serialized fields header content tree |
|
164 */ |
|
165 public Content getSerializableFieldsHeader(); |
|
166 |
|
167 /** |
|
168 * Get the field content header. |
|
169 * |
|
170 * @param isLastContent true if this is the last content to be documented |
|
171 * @return fields header content tree |
|
172 */ |
|
173 public Content getFieldsContentHeader(boolean isLastContent); |
|
174 |
|
175 /** |
|
176 * Get the fields content. |
105 * |
177 * |
106 * @param heading the heading to write. |
178 * @param heading the heading to write. |
107 */ |
179 * @param contentTree content tree to which the heading will be added |
108 public void writeHeader(String heading); |
180 * @return serializable fields content tree |
109 |
181 */ |
110 /** |
182 public Content getSerializableFields(String heading, Content contentTree); |
111 * Write the deprecated information for this member. |
183 |
|
184 /** |
|
185 * Adds the deprecated information for this member. |
112 * |
186 * |
113 * @param field the field to document. |
187 * @param field the field to document. |
114 */ |
188 * @param contentTree content tree to which the deprecated information will be added |
115 public void writeMemberDeprecatedInfo(FieldDoc field); |
189 */ |
116 |
190 public void addMemberDeprecatedInfo(FieldDoc field, Content contentTree); |
117 /** |
191 |
118 * Write the description text for this member. |
192 /** |
|
193 * Adds the description text for this member. |
119 * |
194 * |
120 * @param field the field to document. |
195 * @param field the field to document. |
121 */ |
196 * @param contentTree content tree to which the member description will be added |
122 public void writeMemberDescription(FieldDoc field); |
197 */ |
123 |
198 public void addMemberDescription(FieldDoc field, Content contentTree); |
124 /** |
199 |
125 * Write the description text for this member represented by the tag. |
200 /** |
|
201 * Adds the description text for this member represented by the tag. |
126 * |
202 * |
127 * @param serialFieldTag the field to document (represented by tag). |
203 * @param serialFieldTag the field to document (represented by tag). |
128 */ |
204 * @param contentTree content tree to which the member description will be added |
129 public void writeMemberDescription(SerialFieldTag serialFieldTag); |
205 */ |
130 |
206 public void addMemberDescription(SerialFieldTag serialFieldTag, Content contentTree); |
131 /** |
207 |
132 * Write the tag information for this member. |
208 /** |
|
209 * Adds the tag information for this member. |
133 * |
210 * |
134 * @param field the field to document. |
211 * @param field the field to document. |
135 */ |
212 * @param contentTree content tree to which the member tags will be added |
136 public void writeMemberTags(FieldDoc field); |
213 */ |
137 |
214 public void addMemberTags(FieldDoc field, Content contentTree); |
138 /** |
215 |
139 * Write the member header. |
216 /** |
|
217 * Adds the member header. |
140 * |
218 * |
141 * @param fieldType the type of the field. |
219 * @param fieldType the type of the field. |
142 * @param fieldTypeStr the type of the field in string format. We will |
220 * @param fieldTypeStr the type of the field in string format. We will |
143 * print this out if we can't link to the type. |
221 * print this out if we can't link to the type. |
144 * @param fieldDimensions the dimensions of the field. |
222 * @param fieldDimensions the dimensions of the field. |
145 * @param fieldName the name of the field. |
223 * @param fieldName the name of the field. |
146 */ |
224 * @param contentTree content tree to which the member header will be added |
147 public void writeMemberHeader(ClassDoc fieldType, String fieldTypeStr, |
225 */ |
148 String fieldDimensions, String fieldName); |
226 public void addMemberHeader(ClassDoc fieldType, String fieldTypeStr, |
149 |
227 String fieldDimensions, String fieldName, Content contentTree); |
150 /** |
|
151 * Write the member footer. |
|
152 */ |
|
153 public void writeMemberFooter(); |
|
154 |
228 |
155 /** |
229 /** |
156 * Check to see if overview details should be printed. If |
230 * Check to see if overview details should be printed. If |
157 * nocomment option set or if there is no text to be printed |
231 * nocomment option set or if there is no text to be printed |
158 * for deprecation info, inline comment or tags, |
232 * for deprecation info, inline comment or tags, |
160 * |
234 * |
161 * @param field the field to check overview details for. |
235 * @param field the field to check overview details for. |
162 * @return true if overview details need to be printed |
236 * @return true if overview details need to be printed |
163 */ |
237 */ |
164 public boolean shouldPrintOverview(FieldDoc field); |
238 public boolean shouldPrintOverview(FieldDoc field); |
165 |
|
166 /** |
|
167 * Write the footer. |
|
168 * |
|
169 * @param heading the heading that was written. |
|
170 */ |
|
171 public void writeFooter (String heading); |
|
172 } |
239 } |
173 |
240 |
174 /** |
241 /** |
175 * Write the serialized form for a given field. |
242 * Write the serialized form for a given field. |
176 */ |
243 */ |
177 public interface SerialMethodWriter { |
244 public interface SerialMethodWriter { |
178 |
245 |
179 /** |
246 /** |
|
247 * Get the serializable method header. |
|
248 * |
|
249 * @return serializable methods content tree |
|
250 */ |
|
251 public Content getSerializableMethodsHeader(); |
|
252 |
|
253 /** |
|
254 * Get the method content header. |
|
255 * |
|
256 * @param isLastContent true if this is the last content to be documented |
|
257 * @return methods content tree |
|
258 */ |
|
259 public Content getMethodsContentHeader(boolean isLastContent); |
|
260 |
|
261 /** |
180 * Write the given heading. |
262 * Write the given heading. |
181 * |
263 * |
182 * @param heading the heading to write. |
264 * @param heading the heading to write |
183 */ |
265 * @param serializableMethodTree content tree which will be added |
184 public void writeHeader(String heading); |
266 * @return serializable methods content tree |
|
267 */ |
|
268 public Content getSerializableMethods(String heading, Content serializableMethodTree); |
185 |
269 |
186 /** |
270 /** |
187 * Write a warning that no serializable methods exist. |
271 * Write a warning that no serializable methods exist. |
188 * |
272 * |
189 * @param msg the warning to print. |
273 * @param msg the warning to print |
190 */ |
274 * @return no customization message tree |
191 public void writeNoCustomizationMsg(String msg); |
275 */ |
192 |
276 public Content getNoCustomizationMsg(String msg); |
193 /** |
277 |
194 * Write the header. |
278 /** |
195 * |
279 * Adds the header. |
196 * @param member the member to write the header for. |
280 * |
197 */ |
281 * @param member the member to write the header for |
198 public void writeMemberHeader(MethodDoc member); |
282 * @param methodsContentTree content tree to which the header will be added |
199 |
283 */ |
200 /** |
284 public void addMemberHeader(MethodDoc member, Content methodsContentTree); |
201 * Write the footer. |
285 |
202 */ |
286 /** |
203 public void writeMemberFooter(); |
287 * Adds the deprecated information for this member. |
204 |
288 * |
205 /** |
289 * @param member the member to write the deprecated information for |
206 * Write the deprecated information for this member. |
290 * @param methodsContentTree content tree to which the deprecated |
207 */ |
291 * information will be added |
208 public void writeDeprecatedMemberInfo(MethodDoc member); |
292 */ |
209 |
293 public void addDeprecatedMemberInfo(MethodDoc member, Content methodsContentTree); |
210 /** |
294 |
211 * Write the description for this member. |
295 /** |
212 */ |
296 * Adds the description for this member. |
213 public void writeMemberDescription(MethodDoc member); |
297 * |
214 |
298 * @param member the member to write the information for |
215 /** |
299 * @param methodsContentTree content tree to which the member |
216 * Write the tag information for this member. |
300 * information will be added |
217 */ |
301 */ |
218 public void writeMemberTags(MethodDoc member); |
302 public void addMemberDescription(MethodDoc member, Content methodsContentTree); |
|
303 |
|
304 /** |
|
305 * Adds the tag information for this member. |
|
306 * |
|
307 * @param member the member to write the tags information for |
|
308 * @param methodsContentTree content tree to which the tags |
|
309 * information will be added |
|
310 */ |
|
311 public void addMemberTags(MethodDoc member, Content methodsContentTree); |
219 } |
312 } |
220 } |
313 } |