langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
author briangoetz
Wed, 18 Dec 2013 16:05:18 -0500
changeset 22163 3651128c74eb
parent 20237 b6d89903c867
permissions -rw-r--r--
8030244: Update langtools to use Diamond Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents: 14542
diff changeset
     2
 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
10
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
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
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
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
    23
 * questions.
10
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.internal.toolkit.builders;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    28
import java.util.*;
14258
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    29
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    30
import com.sun.javadoc.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import com.sun.tools.doclets.internal.toolkit.*;
14258
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    32
import com.sun.tools.doclets.internal.toolkit.util.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 * Builds documentation for required annotation type members.
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    37
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    38
 *  If you write code that depends on this, you do so at your own risk.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    39
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    40
 *  deletion without notice.</b>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * @author Jamie Ho
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    43
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * @since 1.5
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
     * The annotation type whose members are being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    protected ClassDoc classDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
     * The visible members for the given class.
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    protected VisibleMemberMap visibleMemberMap;
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
     * The writer to output the member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    protected AnnotationTypeRequiredMemberWriter writer;
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
     * The list of members being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
     */
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    66
    protected List<ProgramElementDoc> members;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     * The index of the current member that is being documented at this point
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * in time.
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
    protected int currentMemberIndex;
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     * Construct a new AnnotationTypeRequiredMemberBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    77
     * @param context  the build context.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    78
     * @param classDoc the class whose members are being documented.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    79
     * @param writer the doclet specific writer.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    81
    protected AnnotationTypeRequiredMemberBuilder(Context context,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    82
            ClassDoc classDoc,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    83
            AnnotationTypeRequiredMemberWriter writer,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    84
            int memberType) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    85
        super(context);
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    86
        this.classDoc = classDoc;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    87
        this.writer = writer;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    88
        this.visibleMemberMap = new VisibleMemberMap(classDoc, memberType,
16319
e586bfeb39c5 7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents: 14542
diff changeset
    89
            configuration);
22163
3651128c74eb 8030244: Update langtools to use Diamond
briangoetz
parents: 20237
diff changeset
    90
        this.members = new ArrayList<>(this.visibleMemberMap.getMembersFor(classDoc));
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    91
        if (configuration.getMemberComparator() != null) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    92
            Collections.sort(this.members, configuration.getMemberComparator());
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    93
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
     * Construct a new AnnotationTypeMemberBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   100
     * @param context  the build context.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   101
     * @param classDoc the class whose members are being documented.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
     * @param writer the doclet specific writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
    public static AnnotationTypeRequiredMemberBuilder getInstance(
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   105
            Context context, ClassDoc classDoc,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
            AnnotationTypeRequiredMemberWriter writer) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   107
        return new AnnotationTypeRequiredMemberBuilder(context, classDoc,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   108
                    writer,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   109
                    VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
    public String getName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        return "AnnotationTypeRequiredMemberDetails";
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
     * Returns a list of members that will be documented for the given class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
     * This information can be used for doclet specific documentation
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
     * generation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
     * @param classDoc the {@link ClassDoc} we want to check.
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
     * @return a list of members that will be documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1264
diff changeset
   127
    public List<ProgramElementDoc> members(ClassDoc classDoc) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
        return visibleMemberMap.getMembersFor(classDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
     * Returns the visible member map for the members of this class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
     * @return the visible member map for the members of this class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
    public VisibleMemberMap getVisibleMemberMap() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
        return visibleMemberMap;
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
     * summaryOrder.size()
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
    public boolean hasMembersToDocument() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        return members.size() > 0;
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   148
     * Build the annotation type required member documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   149
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   150
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   151
     * @param memberDetailsTree the content tree to which the documentation will be added
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   152
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   153
    public void buildAnnotationTypeRequiredMember(XMLNode node, Content memberDetailsTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   154
        buildAnnotationTypeMember(node, memberDetailsTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   155
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   156
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   157
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
     * Build the member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   160
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   161
     * @param memberDetailsTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   163
    public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        if (writer == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
        }
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   167
        int size = members.size();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   168
        if (size > 0) {
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   169
            writer.addAnnotationDetailsMarker(memberDetailsTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   170
            for (currentMemberIndex = 0; currentMemberIndex < size;
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   171
                    currentMemberIndex++) {
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   172
                Content detailsTree = writer.getMemberTreeHeader();
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   173
                writer.addAnnotationDetailsTreeHeader(classDoc, detailsTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   174
                Content annotationDocTree = writer.getAnnotationDocTreeHeader(
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   175
                        (MemberDoc) members.get(currentMemberIndex), detailsTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   176
                buildChildren(node, annotationDocTree);
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   177
                detailsTree.addContent(writer.getAnnotationDoc(
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   178
                        annotationDocTree, (currentMemberIndex == size - 1)));
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16319
diff changeset
   179
                memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   180
            }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   185
     * Build the signature.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   186
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   187
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   188
     * @param annotationDocTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   190
    public void buildSignature(XMLNode node, Content annotationDocTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   191
        annotationDocTree.addContent(
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   192
                writer.getSignature((MemberDoc) members.get(currentMemberIndex)));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
     * Build the deprecation information.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   197
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   198
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   199
     * @param annotationDocTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   201
    public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   202
        writer.addDeprecated((MemberDoc) members.get(currentMemberIndex),
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   203
                annotationDocTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
     * Build the comments for the member.  Do nothing if
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
     * {@link Configuration#nocomment} is set to true.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   209
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   210
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   211
     * @param annotationDocTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   213
    public void buildMemberComments(XMLNode node, Content annotationDocTree) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        if(! configuration.nocomment){
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   215
            writer.addComments((MemberDoc) members.get(currentMemberIndex),
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   216
                    annotationDocTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
     * Build the tag information.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   222
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   223
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   224
     * @param annotationDocTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   226
    public void buildTagInfo(XMLNode node, Content annotationDocTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   227
        writer.addTags((MemberDoc) members.get(currentMemberIndex),
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   228
                annotationDocTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
     * Return the annotation type required member writer for this builder.
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
     * @return the annotation type required member constant writer for this
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
     * builder.
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    public AnnotationTypeRequiredMemberWriter getWriter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
        return writer;
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
}