src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java
author hannesw
Wed, 05 Jun 2019 16:26:13 +0200
changeset 55232 9b392b044f64
parent 54596 86c1da00dd6a
permissions -rw-r--r--
8221709: replace use of style blockListLast 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: 49879
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: 25874
diff changeset
    26
package jdk.javadoc.internal.doclets.toolkit.builders;
10
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
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    30
import javax.lang.model.element.Element;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    31
import javax.lang.model.element.TypeElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    32
import javax.lang.model.element.VariableElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    33
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 44460
diff changeset
    34
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    35
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 35426
diff changeset
    36
import jdk.javadoc.internal.doclets.toolkit.DocletException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    37
import jdk.javadoc.internal.doclets.toolkit.EnumConstantWriter;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    38
49879
601277b1d582 8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents: 47216
diff changeset
    39
import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * Builds documentation for a enum constants.
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    44
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    45
 *  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
    46
 *  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
    47
 *  deletion without notice.</b>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
 * @author Jamie Ho
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    50
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
public class EnumConstantBuilder extends AbstractMemberBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    54
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    55
     * The writer to output the enum constants documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    56
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    57
    private final EnumConstantWriter writer;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    59
    /**
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40587
diff changeset
    60
     * The set of enum constants being documented.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    61
     */
49879
601277b1d582 8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents: 47216
diff changeset
    62
    private final List<? extends Element> enumConstants;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    64
    /**
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    65
     * The current enum constant that is being documented at this point
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    66
     * in time.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    67
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    68
    private VariableElement currentElement;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    70
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    71
     * Construct a new EnumConstantsBuilder.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    72
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    73
     * @param context  the build context.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    74
     * @param typeElement the class whose members are being documented.
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    75
     * @param writer the doclet specific writer.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    76
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    77
    private EnumConstantBuilder(Context context,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    78
            TypeElement typeElement, EnumConstantWriter writer) {
49879
601277b1d582 8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents: 47216
diff changeset
    79
        super(context, typeElement);
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    80
        this.writer = writer;
49879
601277b1d582 8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents: 47216
diff changeset
    81
        enumConstants = getVisibleMembers(ENUM_CONSTANTS);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    82
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    84
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    85
     * Construct a new EnumConstantsBuilder.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    86
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    87
     * @param context  the build context.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    88
     * @param typeElement the class whoses members are being documented.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    89
     * @param writer the doclet specific writer.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 35426
diff changeset
    90
     * @return the new EnumConstantsBuilder
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    91
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    92
    public static EnumConstantBuilder getInstance(Context context,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    93
            TypeElement typeElement, EnumConstantWriter writer) {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    94
        return new EnumConstantBuilder(context, typeElement, writer);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    95
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    97
    /**
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 35426
diff changeset
    98
     * Returns whether or not there are members to document.
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 35426
diff changeset
    99
     *
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 35426
diff changeset
   100
     * @return whether or not there are members to document
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   101
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   102
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   103
    public boolean hasMembersToDocument() {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40587
diff changeset
   104
        return !enumConstants.isEmpty();
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   105
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   107
    /**
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   108
     * {@inheritDoc}
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   109
     */
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   110
    @Override
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   111
    public void build(Content contentTree) throws DocletException {
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   112
        buildEnumConstant(contentTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   113
    }
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   114
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   115
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   116
     * Build the enum constant documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   117
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   118
     * @param memberDetailsTree the content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 35426
diff changeset
   119
     * @throws DocletException is there is a problem while building the documentation
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   120
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   121
    protected void buildEnumConstant(Content memberDetailsTree) throws DocletException {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   122
        if (writer == null) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   123
            return;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
        }
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40587
diff changeset
   125
        if (hasMembersToDocument()) {
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54060
diff changeset
   126
            Content enumConstantsDetailsTreeHeader = writer.getEnumConstantsDetailsTreeHeader(typeElement,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   127
                    memberDetailsTree);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54060
diff changeset
   128
            Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
55232
9b392b044f64 8221709: replace use of style blockListLast
hannesw
parents: 54596
diff changeset
   129
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40587
diff changeset
   130
            for (Element enumConstant : enumConstants) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40587
diff changeset
   131
                currentElement = (VariableElement)enumConstant;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   132
                Content enumConstantsTree = writer.getEnumConstantsTreeHeader(currentElement,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   133
                        enumConstantsDetailsTree);
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   134
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   135
                buildSignature(enumConstantsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   136
                buildDeprecationInfo(enumConstantsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   137
                buildEnumConstantComments(enumConstantsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   138
                buildTagInfo(enumConstantsTree);
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   139
55232
9b392b044f64 8221709: replace use of style blockListLast
hannesw
parents: 54596
diff changeset
   140
                enumConstantsDetailsTree.add(writer.getEnumConstants(enumConstantsTree));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   141
            }
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 49879
diff changeset
   142
            memberDetailsTree.add(
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54060
diff changeset
   143
                    writer.getEnumConstantsDetails(enumConstantsDetailsTreeHeader, enumConstantsDetailsTree));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   144
        }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   145
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   147
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   148
     * Build the signature.
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 enumConstantsTree 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
   151
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   152
    protected void buildSignature(Content enumConstantsTree) {
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 49879
diff changeset
   153
        enumConstantsTree.add(writer.getSignature(currentElement));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   154
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
7614
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
     * Build the deprecation 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 enumConstantsTree 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
   160
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   161
    protected void buildDeprecationInfo(Content enumConstantsTree) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   162
        writer.addDeprecated(currentElement, enumConstantsTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   163
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   165
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   166
     * Build the comments for the enum constant.  Do nothing if
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 44460
diff changeset
   167
     * {@link BaseConfiguration#nocomment} is set to true.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   168
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   169
     * @param enumConstantsTree 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
   170
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   171
    protected void buildEnumConstantComments(Content enumConstantsTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   172
        if (!configuration.nocomment) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   173
            writer.addComments(currentElement, enumConstantsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        }
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   175
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
7614
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
     * Build the tag information.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   179
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   180
     * @param enumConstantsTree 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
   181
     */
45599
8bc3a019f948 8149146: [javadoc] eliminate doclet.xml
jjg
parents: 45417
diff changeset
   182
    protected void buildTagInfo(Content enumConstantsTree) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   183
        writer.addTags(currentElement, enumConstantsTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   184
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
7614
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
     * Return the enum constant writer for this builder.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   188
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   189
     * @return the enum constant writer for this builder.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   190
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   191
    public EnumConstantWriter getWriter() {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   192
        return writer;
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   193
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
}