23 * have any questions. |
23 * have any questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.doclets.internal.toolkit.builders; |
26 package com.sun.tools.doclets.internal.toolkit.builders; |
27 |
27 |
28 import com.sun.tools.doclets.internal.toolkit.util.*; |
|
29 import com.sun.tools.doclets.internal.toolkit.*; |
|
30 import com.sun.javadoc.*; |
|
31 import java.io.*; |
28 import java.io.*; |
32 import java.lang.reflect.*; |
29 import java.lang.reflect.*; |
33 import java.util.*; |
30 import java.util.*; |
|
31 |
|
32 import com.sun.javadoc.*; |
|
33 import com.sun.tools.doclets.internal.toolkit.util.*; |
|
34 import com.sun.tools.doclets.internal.toolkit.*; |
34 |
35 |
35 /** |
36 /** |
36 * Builds the serialized form. |
37 * Builds the serialized form. |
37 * |
38 * |
38 * This code is not part of an API. |
39 * This code is not part of an API. |
39 * It is implementation that is subject to change. |
40 * It is implementation that is subject to change. |
40 * Do not use it as an API |
41 * Do not use it as an API |
41 * |
42 * |
42 * @author Jamie Ho |
43 * @author Jamie Ho |
|
44 * @author Bhavesh Patel (Modified) |
43 * @since 1.5 |
45 * @since 1.5 |
44 */ |
46 */ |
45 public class SerializedFormBuilder extends AbstractBuilder { |
47 public class SerializedFormBuilder extends AbstractBuilder { |
46 |
48 |
47 /** |
49 /** |
403 if (classDoc.definesSerializableFields()) { |
405 if (classDoc.definesSerializableFields()) { |
404 FieldDoc serialPersistentField = |
406 FieldDoc serialPersistentField = |
405 Util.asList(classDoc.serializableFields()).get(0); |
407 Util.asList(classDoc.serializableFields()).get(0); |
406 // Check to see if there are inline comments, tags or deprecation |
408 // Check to see if there are inline comments, tags or deprecation |
407 // information to be printed. |
409 // information to be printed. |
408 if (fieldWriter.shouldPrintMemberDetails(serialPersistentField)) { |
410 if (fieldWriter.shouldPrintOverview(serialPersistentField)) { |
409 fieldWriter.writeHeader( |
411 fieldWriter.writeHeader( |
410 configuration.getText("doclet.Serialized_Form_class")); |
412 configuration.getText("doclet.Serialized_Form_class")); |
411 fieldWriter.writeMemberDeprecatedInfo(serialPersistentField); |
413 fieldWriter.writeMemberDeprecatedInfo(serialPersistentField); |
412 if (!configuration.nocomment) { |
414 if (!configuration.nocomment) { |
413 fieldWriter.writeMemberDescription(serialPersistentField); |
415 fieldWriter.writeMemberDescription(serialPersistentField); |
414 fieldWriter.writeMemberTags(serialPersistentField); |
416 fieldWriter.writeMemberTags(serialPersistentField); |
415 } |
417 } |
416 fieldWriter.writeMemberFooter(serialPersistentField); |
418 // Footer required to close the definition list tag |
|
419 // for serialization overview. |
|
420 fieldWriter.writeFooter( |
|
421 configuration.getText("doclet.Serialized_Form_class")); |
417 } |
422 } |
418 } |
423 } |
419 } |
424 } |
420 |
425 |
421 /** |
426 /** |
474 fieldWriter.writeMemberTags(field); |
479 fieldWriter.writeMemberTags(field); |
475 } |
480 } |
476 } |
481 } |
477 |
482 |
478 /** |
483 /** |
479 * Build the field footer. |
484 * Build the field sub footer. |
480 */ |
485 */ |
481 public void buildFieldFooter() { |
486 public void buildFieldSubFooter() { |
482 if (! currentClass.definesSerializableFields()) { |
487 if (! currentClass.definesSerializableFields()) { |
483 fieldWriter.writeMemberFooter((FieldDoc) currentMember); |
488 fieldWriter.writeMemberFooter(); |
484 } |
489 } |
485 } |
490 } |
486 |
491 |
487 /** |
492 /** |
488 * Build the summaries for the methods that belong to the given |
493 * Build the summaries for the methods that belong to the given |