src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java

Wed, 18 Feb 2009 13:47:27 -0800

author
bpatel
date
Wed, 18 Feb 2009 13:47:27 -0800
changeset 222
d424ed561993
parent 1
9a66ca7c79fa
child 229
03bcd66bd8e7
child 233
5240b1120530
permissions
-rw-r--r--

6802694: Javadoc doclet does not display deprecated information with -nocomment option for serialized form
Reviewed-by: jjg

     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);
   156         /**
   157          * Check to see if member details should be printed. If
   158          * nocomment option set or if there is no text to be printed
   159          * for deprecation info, inline comment, no serial tag or inline tags,
   160          * do not print member details.
   161          *
   162          * @param member the member to check details for.
   163          * @return true if details need to be printed
   164          */
   165         public boolean shouldPrintMemberDetails(FieldDoc member);
   166     }
   168     /**
   169      * Write the serialized form for a given field.
   170      */
   171     public interface SerialMethodWriter {
   173         /**
   174          * Write the given heading.
   175          *
   176          * @param heading the heading to write.
   177          */
   178         public void writeHeader(String heading);
   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);
   187         /**
   188          * Write the header.
   189          *
   190          * @param member the member to write the header for.
   191          */
   192         public void writeMemberHeader(MethodDoc member);
   194         /**
   195          * Write the footer.
   196          *
   197          * @param member the member to write the header for.
   198          */
   199         public void writeMemberFooter(MethodDoc member);
   201         /**
   202          * Write the deprecated information for this member.
   203          */
   204         public void writeDeprecatedMemberInfo(MethodDoc member);
   206         /**
   207          * Write the description for this member.
   208          */
   209         public void writeMemberDescription(MethodDoc member);
   211         /**
   212          * Write the tag information for this member.
   213          */
   214         public void writeMemberTags(MethodDoc member);
   215     }
   216 }

mercurial