src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java
author hannesw
Wed, 27 Nov 2019 13:08:16 +0100
changeset 59294 48b88b9c11eb
parent 54596 86c1da00dd6a
permissions -rw-r--r--
8223378: CSS solution for navbar problem with <a> elements is not ideal Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 52644
diff changeset
     2
 * Copyright (c) 2003, 2019, 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
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    26
package jdk.javadoc.internal.doclets.toolkit.builders;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    28
import javax.lang.model.element.PackageElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    29
import javax.lang.model.element.TypeElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    30
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54060
diff changeset
    31
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    32
import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    33
import jdk.javadoc.internal.doclets.toolkit.Content;
48029
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47272
diff changeset
    34
import jdk.javadoc.internal.doclets.toolkit.DocFilesHandler;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    35
import jdk.javadoc.internal.doclets.toolkit.DocletException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    36
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * Builds the summary for a given annotation type.
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    41
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    42
 *  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
    43
 *  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
    44
 *  deletion without notice.</b>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 * @author Jamie Ho
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    47
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
public class AnnotationTypeBuilder extends AbstractBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
     * The annotation type being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    54
    private final TypeElement annotationType;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
     * The doclet specific writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    59
    private final AnnotationTypeWriter writer;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
     * Construct a new ClassBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    64
     * @param context           the build context.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    65
     * @param annotationTypeElement the class being documented.
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    66
     * @param writer            the doclet specific writer.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    68
    private AnnotationTypeBuilder(Context context,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    69
            TypeElement annotationTypeElement,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    70
            AnnotationTypeWriter writer) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    71
        super(context);
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    72
        this.annotationType = annotationTypeElement;
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    73
        this.writer = writer;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
    /**
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    77
     * Construct a new AnnotationTypeBuilder.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    79
     * @param context           the build context.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
     * @param annotationTypeDoc the class being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
     * @param writer            the doclet specific writer.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    82
     * @return                  an AnnotationTypeBuilder
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    84
    public static AnnotationTypeBuilder getInstance(Context context,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    85
            TypeElement annotationTypeDoc,
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    86
            AnnotationTypeWriter writer) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    87
        return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    93
    @Override
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    94
    public void build() throws DocletException {
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    95
        buildAnnotationTypeDoc();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    98
    /**
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    99
     * Build the annotation type documentation.
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   100
     *
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   101
     * @throws DocletException if there is a problem building the documentation
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   102
     */
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   103
    protected void buildAnnotationTypeDoc() throws DocletException {
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   104
        Content contentTree = writer.getHeader(resources.getText("doclet.AnnotationType") +
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   105
               " " + utils.getSimpleName(annotationType));
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   106
        Content annotationContentTree = writer.getAnnotationContentHeader();
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   107
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   108
        buildAnnotationTypeInfo(annotationContentTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   109
        buildMemberSummary(annotationContentTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   110
        buildAnnotationTypeMemberDetails(annotationContentTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   111
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   112
        writer.addAnnotationContentTree(annotationContentTree);
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   113
        writer.addFooter();
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   114
        writer.printDocument(contentTree);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   115
        copyDocFiles();
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   116
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   118
    /**
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   119
     * Copy the doc files for the current TypeElement if necessary.
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   120
     *
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   121
     * @throws DocletException if there is a problem building the documentation
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   122
     */
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   123
    private void copyDocFiles() throws DocletException {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
   124
        PackageElement containingPackage = utils.containingPackage(annotationType);
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   125
        if ((configuration.packages == null ||
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 20237
diff changeset
   126
            !configuration.packages.contains(containingPackage) &&
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 20237
diff changeset
   127
            !containingPackagesSeen.contains(containingPackage))){
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
            //Only copy doc files dir if the containing package is not
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
            //documented AND if we have not documented a class from the same
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
            //package already. Otherwise, we are making duplicate copies.
48029
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47272
diff changeset
   131
            DocFilesHandler docFilesHandler = configuration
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47272
diff changeset
   132
                    .getWriterFactory()
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47272
diff changeset
   133
                    .getDocFilesHandler(containingPackage);
e9dab2492924 8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents: 47272
diff changeset
   134
            docFilesHandler.copyDocFiles();
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 20237
diff changeset
   135
            containingPackagesSeen.add(containingPackage);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
        }
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   137
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   140
     * Build the annotation information tree documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   141
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   142
     * @param annotationContentTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   143
     * @throws DocletException if there is a problem building the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   145
    protected void buildAnnotationTypeInfo(Content annotationContentTree)
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   146
            throws DocletException {
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54060
diff changeset
   147
        Content annotationInfoTree = new ContentBuilder();
47272
e0d686cdf608 8183511: improve style for deprecated text
bpatel
parents: 47216
diff changeset
   148
        buildAnnotationTypeSignature(annotationInfoTree);
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   149
        buildDeprecationInfo(annotationInfoTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   150
        buildAnnotationTypeDescription(annotationInfoTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   151
        buildAnnotationTypeTagInfo(annotationInfoTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   152
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 52644
diff changeset
   153
        annotationContentTree.add(writer.getAnnotationInfo(annotationInfoTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   157
     * If this annotation is deprecated, build the appropriate information.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   158
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   159
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   161
    protected void buildDeprecationInfo(Content annotationInfoTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   162
        writer.addAnnotationTypeDeprecationInfo(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
     * Build the signature of the current annotation type.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   167
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   168
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   170
    protected void buildAnnotationTypeSignature(Content annotationInfoTree) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
   171
        writer.addAnnotationTypeSignature(utils.modifiersToString(annotationType, true),
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
   172
                annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   176
     * Build the annotation type description.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   177
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   178
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   180
    protected void buildAnnotationTypeDescription(Content annotationInfoTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   181
        writer.addAnnotationTypeDescription(annotationInfoTree);
10
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 tag information for the current annotation type.
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 annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   189
    protected void buildAnnotationTypeTagInfo(Content annotationInfoTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   190
        writer.addAnnotationTypeTagInfo(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   194
     * Build the member summary contents of the page.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   196
     * @param annotationContentTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   197
     * @throws DocletException if there is a problem building the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   199
    protected void buildMemberSummary(Content annotationContentTree) throws DocletException {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   200
        Content memberSummaryTree = writer.getMemberTreeHeader();
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   201
        builderFactory.getMemberSummaryBuilder(writer).build(memberSummaryTree);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 52644
diff changeset
   202
        annotationContentTree.add(writer.getMemberSummaryTree(memberSummaryTree));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   203
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   204
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   205
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   206
     * Build the member details contents of the page.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   207
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   208
     * @param annotationContentTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   209
     * @throws DocletException if there is a problem building the documentation
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   210
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   211
    protected void buildAnnotationTypeMemberDetails(Content annotationContentTree)
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   212
            throws DocletException {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   213
        Content memberDetailsTree = writer.getMemberTreeHeader();
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   214
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   215
        buildAnnotationTypeFieldDetails(memberDetailsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   216
        buildAnnotationTypeRequiredMemberDetails(memberDetailsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   217
        buildAnnotationTypeOptionalMemberDetails(memberDetailsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   218
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   219
        if (memberDetailsTree.isValid()) {
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 52644
diff changeset
   220
            annotationContentTree.add(writer.getMemberDetailsTree(memberDetailsTree));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   221
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
    /**
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   225
     * Build the annotation type field documentation.
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   226
     *
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   227
     * @param memberDetailsTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   228
     * @throws DocletException if there is a problem building the documentation
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   229
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   230
    protected void buildAnnotationTypeFieldDetails(Content memberDetailsTree)
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   231
            throws DocletException {
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   232
        builderFactory.getAnnotationTypeFieldsBuilder(writer).build(memberDetailsTree);
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   233
    }
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   234
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   235
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     * Build the annotation type optional member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   238
     * @param memberDetailsTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   239
     * @throws DocletException if there is a problem building the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   241
    protected void buildAnnotationTypeOptionalMemberDetails(Content memberDetailsTree)
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   242
            throws DocletException {
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   243
        builderFactory.getAnnotationTypeOptionalMemberBuilder(writer).build(memberDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
     * Build the annotation type required member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   249
     * @param memberDetailsTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   250
     * @throws DocletException if there is a problem building the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   252
    protected void buildAnnotationTypeRequiredMemberDetails(Content memberDetailsTree)
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   253
            throws DocletException {
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 40587
diff changeset
   254
        builderFactory.getAnnotationTypeRequiredMemberBuilder(writer).build(memberDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
}