langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 10 06bc494ca11e
child 1787 1aa079321cd2
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
 * have any questions.
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.doclets.formats.html;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.tools.doclets.internal.toolkit.taglets.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import com.sun.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
import java.io.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 * Writes annotation type required member documentation in HTML format.
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * @author Jamie Ho
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
    implements AnnotationTypeRequiredMemberWriter, MemberSummaryWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
     * Construct a new AnnotationTypeRequiredMemberWriterImpl.
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
     * @param writer         the writer that will write the output.
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
     * @param annotationType the AnnotationType that holds this member.
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
    public AnnotationTypeRequiredMemberWriterImpl(SubWriterHolderWriter writer,
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
        AnnotationTypeDoc annotationType) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
        super(writer, annotationType);
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
     * Write the annotation type member summary header for the given class.
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
     * @param classDoc the class the summary belongs to.
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    public void writeMemberSummaryHeader(ClassDoc classDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
        writer.println("<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->");
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        writer.println();
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
        writer.printSummaryHeader(this, classDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
     * Write the annotation type member summary footer for the given class.
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
     * @param classDoc the class the summary belongs to.
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
    public void writeMemberSummaryFooter(ClassDoc classDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
        writer.printSummaryFooter(this, classDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
    public void writeInheritedMemberSummaryHeader(ClassDoc classDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
        //Not appliable.
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
    public void writeInheritedMemberSummary(ClassDoc classDoc,
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        ProgramElementDoc member, boolean isFirst, boolean isLast) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        //Not appliable.
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
    public void writeInheritedMemberSummaryFooter(ClassDoc classDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        //Not appliable.
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
    public void writeHeader(ClassDoc classDoc, String header) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        writer.println();
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        writer.println("<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->");
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
        writer.println();
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
        writer.anchor("annotation_type_element_detail");
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
        writer.printTableHeadingBackground(header);
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
        writer.println();
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
    public void writeMemberHeader(MemberDoc member, boolean isFirst) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
        if (! isFirst) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
            writer.printMemberHeader();
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
            writer.println("");
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
        writer.anchor(member.name() + ((ExecutableMemberDoc) member).signature());
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        writer.h3();
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
        writer.print(member.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        writer.h3End();
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    public void writeSignature(MemberDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
        writer.pre();
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
        writer.writeAnnotationInfo(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
        printModifiers(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
        writer.printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER,
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
            getType(member)));
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
        print(' ');
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        if (configuration().linksource) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
            writer.printSrcLink(member, member.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
            bold(member.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
        writer.preEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
        writer.dl();
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
    public void writeComments(MemberDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        if (member.inlineTags().length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
            writer.dd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
            writer.printInlineComment(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
     * Write the tag output for the given member.
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
     * @param member the member being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
    public void writeTags(MemberDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        writer.printTags(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
     * Write the annotation type member footer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
    public void writeMemberFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
        writer.dlEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
     * Write the footer for the annotation type member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
     * @param classDoc the class that the annotation type member belong to.
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
    public void writeFooter(ClassDoc classDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        //No footer to write for annotation type member documentation
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
     * Close the writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
    public void close() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
        writer.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
    public void printSummaryLabel(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
        writer.boldText("doclet.Annotation_Type_Required_Member_Summary");
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
    public void printSummaryAnchor(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
        writer.anchor("annotation_type_required_element_summary");
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
    public void printInheritedSummaryAnchor(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
    }   // no such
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
    public void printInheritedSummaryLabel(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        // no such
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
    protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
        writer.bold();
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        writer.printDocLink(context, (MemberDoc) member, member.name(), false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
        writer.boldEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
    protected void writeInheritedSummaryLink(ClassDoc cd,
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
            ProgramElementDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
        //Not applicable.
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
    protected void printSummaryType(ProgramElementDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
        MemberDoc m = (MemberDoc)member;
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
        printModifierAndType(m, getType(m));
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    protected void writeDeprecatedLink(ProgramElementDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
        writer.printDocLink(LinkInfoImpl.CONTEXT_MEMBER,
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
            (MemberDoc) member, ((MemberDoc)member).qualifiedName(), false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
    protected void printNavSummaryLink(ClassDoc cd, boolean link) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
        if (link) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
            writer.printHyperLink("", "annotation_type_required_element_summary",
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
                    configuration().getText("doclet.navAnnotationTypeRequiredMember"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
            writer.printText("doclet.navAnnotationTypeRequiredMember");
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
    protected void printNavDetailLink(boolean link) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
        if (link) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
            writer.printHyperLink("", "annotation_type_element_detail",
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
                configuration().getText("doclet.navAnnotationTypeMember"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
            writer.printText("doclet.navAnnotationTypeMember");
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
    public void writeDeprecated(MemberDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
        print(((TagletOutputImpl)
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
            (new DeprecatedTaglet()).getTagletOutput(member,
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
            writer.getTagletWriterInstance(false))).toString());
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
    private Type getType(MemberDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
        if (member instanceof FieldDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
            return ((FieldDoc) member).type();
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
            return ((MethodDoc) member).returnType();
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
}