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

Wed, 18 Sep 2013 17:13:26 -0700

author
bpatel
date
Wed, 18 Sep 2013 17:13:26 -0700
changeset 2035
a2a5ad0853ed
parent 1606
ccbe7ffdd867
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8015249: javadoc fails to document static final fields in annotation types
Reviewed-by: jjg

duke@1 1 /*
bpatel@1568 2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. 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
ohair@554 7 * published by the Free Software Foundation. Oracle designates this
duke@1 8 * particular file as subject to the "Classpath" exception as provided
ohair@554 9 * by Oracle 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 *
ohair@554 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@554 22 * or visit www.oracle.com if you need additional information or have any
ohair@554 23 * questions.
duke@1 24 */
duke@1 25
duke@1 26 package com.sun.tools.doclets.internal.toolkit;
duke@1 27
jjg@1357 28 import com.sun.javadoc.*;
bpatel@1568 29 import com.sun.tools.javac.jvm.Profile;
duke@1 30 import com.sun.tools.doclets.internal.toolkit.util.*;
duke@1 31
duke@1 32 /**
duke@1 33 * The interface for a factory creates writers.
duke@1 34 *
jjg@1359 35 * <p><b>This is NOT part of any supported API.
jjg@1359 36 * If you write code that depends on this, you do so at your own risk.
jjg@1359 37 * This code and its internal interfaces are subject to change or
jjg@1359 38 * deletion without notice.</b>
duke@1 39 *
duke@1 40 * @author Jamie Ho
duke@1 41 * @since 1.4
duke@1 42 */
duke@1 43
duke@1 44 public interface WriterFactory {
duke@1 45
duke@1 46 /**
duke@1 47 * Return the writer for the constant summary.
duke@1 48 *
duke@1 49 * @return the writer for the constant summary. Return null if this
duke@1 50 * writer is not supported by the doclet.
duke@1 51 */
duke@1 52 public abstract ConstantsSummaryWriter getConstantsSummaryWriter()
duke@1 53 throws Exception;
duke@1 54
duke@1 55 /**
duke@1 56 * Return the writer for the package summary.
duke@1 57 *
duke@1 58 * @param packageDoc the package being documented.
duke@1 59 * @param prevPkg the previous package that was documented.
duke@1 60 * @param nextPkg the next package being documented.
duke@1 61 * @return the writer for the package summary. Return null if this
duke@1 62 * writer is not supported by the doclet.
duke@1 63 */
duke@1 64 public abstract PackageSummaryWriter getPackageSummaryWriter(PackageDoc
duke@1 65 packageDoc, PackageDoc prevPkg, PackageDoc nextPkg)
duke@1 66 throws Exception;
duke@1 67
duke@1 68 /**
bpatel@1568 69 * Return the writer for the profile summary.
bpatel@1568 70 *
bpatel@1568 71 * @param profile the profile being documented.
bpatel@1568 72 * @param prevProfile the previous profile that was documented.
bpatel@1568 73 * @param nextProfile the next profile being documented.
bpatel@1568 74 * @return the writer for the profile summary. Return null if this
bpatel@1568 75 * writer is not supported by the doclet.
bpatel@1568 76 */
bpatel@1568 77 public abstract ProfileSummaryWriter getProfileSummaryWriter(Profile
bpatel@1568 78 profile, Profile prevProfile, Profile nextProfile)
bpatel@1568 79 throws Exception;
bpatel@1568 80
bpatel@1568 81 /**
bpatel@1568 82 * Return the writer for the profile package summary.
bpatel@1568 83 *
bpatel@1568 84 * @param packageDoc the profile package being documented.
bpatel@1568 85 * @param prevPkg the previous profile package that was documented.
bpatel@1568 86 * @param nextPkg the next profile package being documented.
bpatel@1568 87 * @param profile the profile being documented.
bpatel@1568 88 * @return the writer for the profile package summary. Return null if this
bpatel@1568 89 * writer is not supported by the doclet.
bpatel@1568 90 */
bpatel@1568 91 public abstract ProfilePackageSummaryWriter getProfilePackageSummaryWriter(
bpatel@1568 92 PackageDoc packageDoc, PackageDoc prevPkg, PackageDoc nextPkg,
bpatel@1568 93 Profile profile) throws Exception;
bpatel@1568 94
bpatel@1568 95 /**
duke@1 96 * Return the writer for a class.
duke@1 97 *
duke@1 98 * @param classDoc the class being documented.
duke@1 99 * @param prevClass the previous class that was documented.
duke@1 100 * @param nextClass the next class being documented.
duke@1 101 * @param classTree the class tree.
duke@1 102 * @return the writer for the class. Return null if this
duke@1 103 * writer is not supported by the doclet.
duke@1 104 */
duke@1 105 public abstract ClassWriter getClassWriter(ClassDoc classDoc,
duke@1 106 ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree)
duke@1 107 throws Exception;
duke@1 108
duke@1 109 /**
duke@1 110 * Return the writer for an annotation type.
duke@1 111 *
duke@1 112 * @param annotationType the type being documented.
duke@1 113 * @param prevType the previous type that was documented.
duke@1 114 * @param nextType the next type being documented.
duke@1 115 * @return the writer for the annotation type. Return null if this
duke@1 116 * writer is not supported by the doclet.
duke@1 117 */
duke@1 118 public abstract AnnotationTypeWriter getAnnotationTypeWriter(
duke@1 119 AnnotationTypeDoc annotationType, Type prevType, Type nextType)
duke@1 120 throws Exception;
duke@1 121
duke@1 122 /**
duke@1 123 * Return the method writer for a given class.
duke@1 124 *
duke@1 125 * @param classWriter the writer for the class being documented.
duke@1 126 * @return the method writer for the give class. Return null if this
duke@1 127 * writer is not supported by the doclet.
duke@1 128 */
duke@1 129 public abstract MethodWriter getMethodWriter(ClassWriter classWriter)
duke@1 130 throws Exception;
duke@1 131
duke@1 132 /**
bpatel@2035 133 * Return the annotation type field writer for a given annotation type.
bpatel@2035 134 *
bpatel@2035 135 * @param annotationTypeWriter the writer for the annotation type
bpatel@2035 136 * being documented.
bpatel@2035 137 * @return the member writer for the given annotation type. Return null if
bpatel@2035 138 * this writer is not supported by the doclet.
bpatel@2035 139 */
bpatel@2035 140 public abstract AnnotationTypeFieldWriter
bpatel@2035 141 getAnnotationTypeFieldWriter(
bpatel@2035 142 AnnotationTypeWriter annotationTypeWriter) throws Exception;
bpatel@2035 143
bpatel@2035 144 /**
duke@1 145 * Return the annotation type optional member writer for a given annotation
duke@1 146 * type.
duke@1 147 *
duke@1 148 * @param annotationTypeWriter the writer for the annotation type
duke@1 149 * being documented.
duke@1 150 * @return the member writer for the given annotation type. Return null if
duke@1 151 * this writer is not supported by the doclet.
duke@1 152 */
duke@1 153 public abstract AnnotationTypeOptionalMemberWriter
duke@1 154 getAnnotationTypeOptionalMemberWriter(
duke@1 155 AnnotationTypeWriter annotationTypeWriter) throws Exception;
duke@1 156
duke@1 157 /**
duke@1 158 * Return the annotation type required member writer for a given annotation type.
duke@1 159 *
duke@1 160 * @param annotationTypeWriter the writer for the annotation type
duke@1 161 * being documented.
duke@1 162 * @return the member writer for the given annotation type. Return null if
duke@1 163 * this writer is not supported by the doclet.
duke@1 164 */
duke@1 165 public abstract AnnotationTypeRequiredMemberWriter
duke@1 166 getAnnotationTypeRequiredMemberWriter(
duke@1 167 AnnotationTypeWriter annotationTypeWriter) throws Exception;
duke@1 168
duke@1 169 /**
duke@1 170 * Return the enum constant writer for a given class.
duke@1 171 *
duke@1 172 * @param classWriter the writer for the class being documented.
duke@1 173 * @return the enum constant writer for the give class. Return null if this
duke@1 174 * writer is not supported by the doclet.
duke@1 175 */
duke@1 176 public abstract EnumConstantWriter getEnumConstantWriter(
duke@1 177 ClassWriter classWriter) throws Exception;
duke@1 178
duke@1 179 /**
duke@1 180 * Return the field writer for a given class.
duke@1 181 *
duke@1 182 * @param classWriter the writer for the class being documented.
duke@1 183 * @return the field writer for the give class. Return null if this
duke@1 184 * writer is not supported by the doclet.
duke@1 185 */
duke@1 186 public abstract FieldWriter getFieldWriter(ClassWriter classWriter)
duke@1 187 throws Exception;
duke@1 188
duke@1 189 /**
jjg@1606 190 * Return the property writer for a given class.
jjg@1606 191 *
jjg@1606 192 * @param classWriter the writer for the class being documented.
jjg@1606 193 * @return the property writer for the give class. Return null if this
jjg@1606 194 * writer is not supported by the doclet.
jjg@1606 195 */
jjg@1606 196 public abstract PropertyWriter getPropertyWriter(ClassWriter classWriter)
jjg@1606 197 throws Exception;
jjg@1606 198
jjg@1606 199 /**
duke@1 200 * Return the constructor writer for a given class.
duke@1 201 *
duke@1 202 * @param classWriter the writer for the class being documented.
duke@1 203 * @return the method writer for the give class. Return null if this
duke@1 204 * writer is not supported by the doclet.
duke@1 205 */
duke@1 206 public abstract ConstructorWriter getConstructorWriter(
duke@1 207 ClassWriter classWriter)
duke@1 208 throws Exception;
duke@1 209
duke@1 210 /**
duke@1 211 * Return the specified member summary writer for a given class.
duke@1 212 *
duke@1 213 * @param classWriter the writer for the class being documented.
duke@1 214 * @param memberType the {@link VisibleMemberMap} member type indicating
duke@1 215 * the type of member summary that should be returned.
duke@1 216 * @return the summary writer for the give class. Return null if this
duke@1 217 * writer is not supported by the doclet.
duke@1 218 *
duke@1 219 * @see VisibleMemberMap
duke@1 220 * @throws IllegalArgumentException if memberType is unknown.
duke@1 221 */
duke@1 222 public abstract MemberSummaryWriter getMemberSummaryWriter(
duke@1 223 ClassWriter classWriter, int memberType)
duke@1 224 throws Exception;
duke@1 225
duke@1 226 /**
duke@1 227 * Return the specified member summary writer for a given annotation type.
duke@1 228 *
duke@1 229 * @param annotationTypeWriter the writer for the annotation type being
duke@1 230 * documented.
duke@1 231 * @param memberType the {@link VisibleMemberMap} member type indicating
duke@1 232 * the type of member summary that should be returned.
duke@1 233 * @return the summary writer for the give class. Return null if this
duke@1 234 * writer is not supported by the doclet.
duke@1 235 *
duke@1 236 * @see VisibleMemberMap
duke@1 237 * @throws IllegalArgumentException if memberType is unknown.
duke@1 238 */
duke@1 239 public abstract MemberSummaryWriter getMemberSummaryWriter(
duke@1 240 AnnotationTypeWriter annotationTypeWriter, int memberType)
duke@1 241 throws Exception;
duke@1 242
duke@1 243 /**
duke@1 244 * Return the writer for the serialized form.
duke@1 245 *
duke@1 246 * @return the writer for the serialized form.
duke@1 247 */
duke@1 248 public SerializedFormWriter getSerializedFormWriter() throws Exception;
duke@1 249 }

mercurial