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

duke@1 1 /*
xdono@229 2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation. Sun designates this
duke@1 8 * particular file as subject to the "Classpath" exception as provided
duke@1 9 * by Sun in the LICENSE file that accompanied this code.
duke@1 10 *
duke@1 11 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 14 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 15 * accompanied this code).
duke@1 16 *
duke@1 17 * You should have received a copy of the GNU General Public License version
duke@1 18 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 20 *
duke@1 21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@1 22 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@1 23 * have any questions.
duke@1 24 */
duke@1 25
duke@1 26 package com.sun.tools.doclets.internal.toolkit;
duke@1 27
bpatel@233 28 import java.io.*;
bpatel@233 29
duke@1 30 import com.sun.javadoc.*;
duke@1 31
duke@1 32 /**
duke@1 33 * The interface for writing serialized form output.
duke@1 34 *
duke@1 35 * This code is not part of an API.
duke@1 36 * It is implementation that is subject to change.
duke@1 37 * Do not use it as an API
duke@1 38 *
duke@1 39 * @author Jamie Ho
duke@1 40 * @since 1.5
duke@1 41 */
duke@1 42
duke@1 43 public interface SerializedFormWriter {
duke@1 44
duke@1 45 /**
duke@1 46 * Write the given header.
duke@1 47 *
duke@1 48 * @param header the header to write.
duke@1 49 */
duke@1 50 public void writeHeader(String header);
duke@1 51
duke@1 52 /**
duke@1 53 * Write the given package header.
duke@1 54 *
duke@1 55 * @param packageName the package header to write.
duke@1 56 */
duke@1 57 public void writePackageHeader(String packageName);
duke@1 58
duke@1 59 /**
duke@1 60 * Write the heading for the serializable class.
duke@1 61 *
duke@1 62 * @param classDoc the class being processed.
duke@1 63 */
duke@1 64 public void writeClassHeader(ClassDoc classDoc);
duke@1 65
duke@1 66 /**
duke@1 67 * Write the serial UID info.
duke@1 68 *
duke@1 69 * @param header the header that will show up before the UID.
duke@1 70 * @param serialUID the serial UID to print.
duke@1 71 */
duke@1 72 public void writeSerialUIDInfo(String header, String serialUID);
duke@1 73
duke@1 74 /**
duke@1 75 * Return an instance of a SerialFieldWriter.
duke@1 76 *
duke@1 77 * @return an instance of a SerialFieldWriter.
duke@1 78 */
duke@1 79 public SerialFieldWriter getSerialFieldWriter(ClassDoc classDoc);
duke@1 80
duke@1 81 /**
duke@1 82 * Return an instance of a SerialMethodWriter.
duke@1 83 *
duke@1 84 * @return an instance of a SerialMethodWriter.
duke@1 85 */
duke@1 86 public SerialMethodWriter getSerialMethodWriter(ClassDoc classDoc);
duke@1 87
duke@1 88 /**
duke@1 89 * Close the writer.
duke@1 90 */
duke@1 91 public abstract void close() throws IOException;
duke@1 92
duke@1 93 /**
duke@1 94 * Write the footer.
duke@1 95 */
duke@1 96 public void writeFooter();
duke@1 97
duke@1 98 /**
duke@1 99 * Write the serialized form for a given field.
duke@1 100 */
duke@1 101 public interface SerialFieldWriter {
duke@1 102
duke@1 103 /**
duke@1 104 * Write the given heading.
duke@1 105 *
duke@1 106 * @param heading the heading to write.
duke@1 107 */
duke@1 108 public void writeHeader(String heading);
duke@1 109
duke@1 110 /**
duke@1 111 * Write the deprecated information for this member.
duke@1 112 *
duke@1 113 * @param field the field to document.
duke@1 114 */
duke@1 115 public void writeMemberDeprecatedInfo(FieldDoc field);
duke@1 116
duke@1 117 /**
duke@1 118 * Write the description text for this member.
duke@1 119 *
duke@1 120 * @param field the field to document.
duke@1 121 */
duke@1 122 public void writeMemberDescription(FieldDoc field);
duke@1 123
duke@1 124 /**
duke@1 125 * Write the description text for this member represented by the tag.
duke@1 126 *
duke@1 127 * @param serialFieldTag the field to document (represented by tag).
duke@1 128 */
duke@1 129 public void writeMemberDescription(SerialFieldTag serialFieldTag);
duke@1 130
duke@1 131 /**
duke@1 132 * Write the tag information for this member.
duke@1 133 *
duke@1 134 * @param field the field to document.
duke@1 135 */
duke@1 136 public void writeMemberTags(FieldDoc field);
duke@1 137
duke@1 138 /**
duke@1 139 * Write the member header.
duke@1 140 *
duke@1 141 * @param fieldType the type of the field.
duke@1 142 * @param fieldTypeStr the type of the field in string format. We will
duke@1 143 * print this out if we can't link to the type.
duke@1 144 * @param fieldDimensions the dimensions of the field.
duke@1 145 * @param fieldName the name of the field.
duke@1 146 */
duke@1 147 public void writeMemberHeader(ClassDoc fieldType, String fieldTypeStr,
duke@1 148 String fieldDimensions, String fieldName);
duke@1 149
duke@1 150 /**
bpatel@233 151 * Write the member footer.
bpatel@233 152 */
bpatel@233 153 public void writeMemberFooter();
bpatel@233 154
bpatel@233 155 /**
bpatel@233 156 * Check to see if overview details should be printed. If
bpatel@233 157 * nocomment option set or if there is no text to be printed
bpatel@233 158 * for deprecation info, inline comment or tags,
bpatel@233 159 * do not print overview details.
bpatel@233 160 *
bpatel@233 161 * @param field the field to check overview details for.
bpatel@233 162 * @return true if overview details need to be printed
bpatel@233 163 */
bpatel@233 164 public boolean shouldPrintOverview(FieldDoc field);
bpatel@233 165
bpatel@233 166 /**
duke@1 167 * Write the footer.
duke@1 168 *
bpatel@233 169 * @param heading the heading that was written.
duke@1 170 */
bpatel@233 171 public void writeFooter (String heading);
duke@1 172 }
duke@1 173
duke@1 174 /**
duke@1 175 * Write the serialized form for a given field.
duke@1 176 */
duke@1 177 public interface SerialMethodWriter {
duke@1 178
duke@1 179 /**
duke@1 180 * Write the given heading.
duke@1 181 *
duke@1 182 * @param heading the heading to write.
duke@1 183 */
duke@1 184 public void writeHeader(String heading);
duke@1 185
duke@1 186 /**
duke@1 187 * Write a warning that no serializable methods exist.
duke@1 188 *
duke@1 189 * @param msg the warning to print.
duke@1 190 */
duke@1 191 public void writeNoCustomizationMsg(String msg);
duke@1 192
duke@1 193 /**
duke@1 194 * Write the header.
duke@1 195 *
duke@1 196 * @param member the member to write the header for.
duke@1 197 */
duke@1 198 public void writeMemberHeader(MethodDoc member);
duke@1 199
duke@1 200 /**
duke@1 201 * Write the footer.
duke@1 202 */
bpatel@233 203 public void writeMemberFooter();
duke@1 204
duke@1 205 /**
duke@1 206 * Write the deprecated information for this member.
duke@1 207 */
duke@1 208 public void writeDeprecatedMemberInfo(MethodDoc member);
duke@1 209
duke@1 210 /**
duke@1 211 * Write the description for this member.
duke@1 212 */
duke@1 213 public void writeMemberDescription(MethodDoc member);
duke@1 214
duke@1 215 /**
duke@1 216 * Write the tag information for this member.
duke@1 217 */
duke@1 218 public void writeMemberTags(MethodDoc member);
duke@1 219 }
duke@1 220 }

mercurial