23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package jdk.javadoc.internal.doclets.toolkit; |
26 package jdk.javadoc.internal.doclets.toolkit; |
27 |
27 |
28 import java.io.*; |
|
29 |
|
30 import javax.lang.model.element.ExecutableElement; |
28 import javax.lang.model.element.ExecutableElement; |
31 import javax.lang.model.element.TypeElement; |
29 import javax.lang.model.element.TypeElement; |
32 import javax.lang.model.element.VariableElement; |
30 import javax.lang.model.element.VariableElement; |
33 |
31 |
34 import com.sun.source.doctree.DocTree; |
32 import com.sun.source.doctree.DocTree; |
|
33 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; |
35 |
34 |
36 /** |
35 /** |
37 * The interface for writing serialized form output. |
36 * The interface for writing serialized form output. |
38 * |
37 * |
39 * <p><b>This is NOT part of any supported API. |
38 * <p><b>This is NOT part of any supported API. |
122 * @return a content tree for the class serialize content header |
121 * @return a content tree for the class serialize content header |
123 */ |
122 */ |
124 public Content getClassContentHeader(); |
123 public Content getClassContentHeader(); |
125 |
124 |
126 /** |
125 /** |
127 * Return an instance of a SerialFieldWriter. |
126 * Return an instance of a SerialFieldWriter for a class. |
128 * |
127 * |
|
128 * @param typeElement the class |
129 * @return an instance of a SerialFieldWriter. |
129 * @return an instance of a SerialFieldWriter. |
130 */ |
130 */ |
131 public SerialFieldWriter getSerialFieldWriter(TypeElement typeElement); |
131 public SerialFieldWriter getSerialFieldWriter(TypeElement typeElement); |
132 |
132 |
133 /** |
133 /** |
134 * Return an instance of a SerialMethodWriter. |
134 * Return an instance of a SerialMethodWriter for a class. |
135 * |
135 * |
|
136 * @param typeElement the class |
136 * @return an instance of a SerialMethodWriter. |
137 * @return an instance of a SerialMethodWriter. |
137 */ |
138 */ |
138 public SerialMethodWriter getSerialMethodWriter(TypeElement typeElement); |
139 public SerialMethodWriter getSerialMethodWriter(TypeElement typeElement); |
139 |
140 |
140 /** |
141 /** |
154 |
155 |
155 /** |
156 /** |
156 * Print the serialized form document. |
157 * Print the serialized form document. |
157 * |
158 * |
158 * @param serializedTree the content tree that will be printed |
159 * @param serializedTree the content tree that will be printed |
159 */ |
160 * @throws DocFileIOException if there is a problem while writing the document |
160 public abstract void printDocument(Content serializedTree) throws IOException; |
161 */ |
|
162 public abstract void printDocument(Content serializedTree) throws DocFileIOException; |
161 |
163 |
162 /** |
164 /** |
163 * Write the serialized form for a given field. |
165 * Write the serialized form for a given field. |
164 */ |
166 */ |
165 public interface SerialFieldWriter { |
167 public interface SerialFieldWriter { |
197 public void addMemberDeprecatedInfo(VariableElement field, Content contentTree); |
199 public void addMemberDeprecatedInfo(VariableElement field, Content contentTree); |
198 |
200 |
199 /** |
201 /** |
200 * Adds the description text for this member. |
202 * Adds the description text for this member. |
201 * |
203 * |
202 * @param field the field to document. |
204 * @param field the field to document |
203 * @param contentTree content tree to which the member description will be added |
205 * @param contentTree content tree to which the member description will be added |
204 */ |
206 */ |
205 public void addMemberDescription(VariableElement field, Content contentTree); |
207 public void addMemberDescription(VariableElement field, Content contentTree); |
206 |
208 |
207 /** |
209 /** |
208 * Adds the description text for this member represented by the tag. |
210 * Adds the description text for this member represented by the tag. |
209 * |
211 * |
210 * @param serialFieldTag the field to document (represented by tag). |
212 * @param field the field to document |
|
213 * @param serialFieldTag the field to document (represented by tag) |
211 * @param contentTree content tree to which the member description will be added |
214 * @param contentTree content tree to which the member description will be added |
212 */ |
215 */ |
213 public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content contentTree); |
216 public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content contentTree); |
214 |
217 |
215 /** |
218 /** |
216 * Adds the tag information for this member. |
219 * Adds the tag information for this member. |
217 * |
220 * |
218 * @param field the field to document. |
221 * @param field the field to document |
219 * @param contentTree content tree to which the member tags will be added |
222 * @param contentTree content tree to which the member tags will be added |
220 */ |
223 */ |
221 public void addMemberTags(VariableElement field, Content contentTree); |
224 public void addMemberTags(VariableElement field, Content contentTree); |
222 |
225 |
223 /** |
226 /** |
224 * Adds the member header. |
227 * Adds the member header. |
225 * |
228 * |
226 * @param fieldType the type of the field. |
229 * @param fieldType the type of the field |
227 * @param fieldTypeStr the type of the field in string format. We will |
230 * @param fieldTypeStr the type of the field in string format. We will |
228 * print this out if we can't link to the type. |
231 * print this out if we can't link to the type |
229 * @param fieldDimensions the dimensions of the field. |
232 * @param fieldDimensions the dimensions of the field |
230 * @param fieldName the name of the field. |
233 * @param fieldName the name of the field |
231 * @param contentTree content tree to which the member header will be added |
234 * @param contentTree content tree to which the member header will be added |
232 */ |
235 */ |
233 public void addMemberHeader(TypeElement fieldType, String fieldTypeStr, |
236 public void addMemberHeader(TypeElement fieldType, String fieldTypeStr, |
234 String fieldDimensions, String fieldName, Content contentTree); |
237 String fieldDimensions, String fieldName, Content contentTree); |
235 |
238 |
237 * Check to see if overview details should be printed. If |
240 * Check to see if overview details should be printed. If |
238 * nocomment option set or if there is no text to be printed |
241 * nocomment option set or if there is no text to be printed |
239 * for deprecation info, inline comment or tags, |
242 * for deprecation info, inline comment or tags, |
240 * do not print overview details. |
243 * do not print overview details. |
241 * |
244 * |
242 * @param field the field to check overview details for. |
245 * @param field the field to check overview details for |
243 * @return true if overview details need to be printed |
246 * @return true if overview details need to be printed |
244 */ |
247 */ |
245 public boolean shouldPrintOverview(VariableElement field); |
248 public boolean shouldPrintOverview(VariableElement field); |
246 } |
249 } |
247 |
250 |