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

Mon, 09 Mar 2009 23:53:41 -0700

author
tbell
date
Mon, 09 Mar 2009 23:53:41 -0700
changeset 240
8c55d5b0ed71
parent 229
03bcd66bd8e7
parent 233
5240b1120530
child 554
9d9f26857129
permissions
-rw-r--r--

Merge

     1 /*
     2  * Copyright 2003-2009 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 java.io.*;
    30 import com.sun.javadoc.*;
    32 /**
    33  * The interface for writing serialized form output.
    34  *
    35  * This code is not part of an API.
    36  * It is implementation that is subject to change.
    37  * Do not use it as an API
    38  *
    39  * @author Jamie Ho
    40  * @since 1.5
    41  */
    43 public interface SerializedFormWriter {
    45     /**
    46      * Write the given header.
    47      *
    48      * @param header the header to write.
    49      */
    50     public void writeHeader(String header);
    52     /**
    53      * Write the given package header.
    54      *
    55      * @param packageName the package header to write.
    56      */
    57     public void writePackageHeader(String packageName);
    59     /**
    60      * Write the heading for the serializable class.
    61      *
    62      * @param classDoc the class being processed.
    63      */
    64     public void writeClassHeader(ClassDoc classDoc);
    66     /**
    67      * Write the serial UID info.
    68      *
    69      * @param header the header that will show up before the UID.
    70      * @param serialUID the serial UID to print.
    71      */
    72     public void writeSerialUIDInfo(String header, String serialUID);
    74     /**
    75      * Return an instance of a SerialFieldWriter.
    76      *
    77      * @return an instance of a SerialFieldWriter.
    78      */
    79     public SerialFieldWriter getSerialFieldWriter(ClassDoc classDoc);
    81     /**
    82      * Return an instance of a SerialMethodWriter.
    83      *
    84      * @return an instance of a SerialMethodWriter.
    85      */
    86     public SerialMethodWriter getSerialMethodWriter(ClassDoc classDoc);
    88     /**
    89      * Close the writer.
    90      */
    91     public abstract void close() throws IOException;
    93     /**
    94      * Write the footer.
    95      */
    96     public void writeFooter();
    98     /**
    99      * Write the serialized form for a given field.
   100      */
   101     public interface SerialFieldWriter {
   103         /**
   104          * Write the given heading.
   105          *
   106          * @param heading the heading to write.
   107          */
   108         public void writeHeader(String heading);
   110         /**
   111          * Write the deprecated information for this member.
   112          *
   113          * @param field the field to document.
   114          */
   115         public void writeMemberDeprecatedInfo(FieldDoc field);
   117         /**
   118          * Write the description text for this member.
   119          *
   120          * @param field the field to document.
   121          */
   122         public void writeMemberDescription(FieldDoc field);
   124         /**
   125          * Write the description text for this member represented by the tag.
   126          *
   127          * @param serialFieldTag the field to document (represented by tag).
   128          */
   129         public void writeMemberDescription(SerialFieldTag serialFieldTag);
   131         /**
   132          * Write the tag information for this member.
   133          *
   134          * @param field the field to document.
   135          */
   136         public void writeMemberTags(FieldDoc field);
   138         /**
   139          * Write the member header.
   140          *
   141          * @param fieldType the type of the field.
   142          * @param fieldTypeStr the type of the field in string format.  We will
   143          * print this out if we can't link to the type.
   144          * @param fieldDimensions the dimensions of the field.
   145          * @param fieldName the name of the field.
   146          */
   147         public void writeMemberHeader(ClassDoc fieldType, String fieldTypeStr,
   148             String fieldDimensions, String fieldName);
   150         /**
   151          * Write the member footer.
   152          */
   153         public void writeMemberFooter();
   155         /**
   156          * Check to see if overview details should be printed. If
   157          * nocomment option set or if there is no text to be printed
   158          * for deprecation info, inline comment or tags,
   159          * do not print overview details.
   160          *
   161          * @param field the field to check overview details for.
   162          * @return true if overview details need to be printed
   163          */
   164         public boolean shouldPrintOverview(FieldDoc field);
   166         /**
   167          * Write the footer.
   168          *
   169          * @param heading the heading that was written.
   170          */
   171         public void writeFooter (String heading);
   172     }
   174     /**
   175      * Write the serialized form for a given field.
   176      */
   177     public interface SerialMethodWriter {
   179         /**
   180          * Write the given heading.
   181          *
   182          * @param heading the heading to write.
   183          */
   184         public void writeHeader(String heading);
   186         /**
   187          * Write a warning that no serializable methods exist.
   188          *
   189          * @param msg the warning to print.
   190          */
   191         public void writeNoCustomizationMsg(String msg);
   193         /**
   194          * Write the header.
   195          *
   196          * @param member the member to write the header for.
   197          */
   198         public void writeMemberHeader(MethodDoc member);
   200         /**
   201          * Write the footer.
   202          */
   203         public void writeMemberFooter();
   205         /**
   206          * Write the deprecated information for this member.
   207          */
   208         public void writeDeprecatedMemberInfo(MethodDoc member);
   210         /**
   211          * Write the description for this member.
   212          */
   213         public void writeMemberDescription(MethodDoc member);
   215         /**
   216          * Write the tag information for this member.
   217          */
   218         public void writeMemberTags(MethodDoc member);
   219     }
   220 }

mercurial