langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java
author ksrini
Sat, 28 Nov 2015 18:52:17 -0800
changeset 35426 374342e56a56
parent 31943 langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java@72b69ab429c9
child 40303 96a1226aca18
permissions -rw-r--r--
8035473: [javadoc] Revamp the existing Doclet APIs 8146529: Update the new Doclet API 8146427: "-nohelp" option issue 8146475: "-helpfile" option issue Reviewed-by: alanb, bpatel, ihse, jjg, jlahoda, mchung, ogb, vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
     2
 * Copyright (c) 1997, 2016, 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: 2320
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: 2320
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: 2320
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
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: 31943
diff changeset
    26
package jdk.javadoc.internal.doclets.formats.html;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
2216
b124d5c924eb 6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents: 1789
diff changeset
    28
import java.io.*;
b124d5c924eb 6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents: 1789
diff changeset
    29
import java.util.*;
b124d5c924eb 6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents: 1789
diff changeset
    30
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    31
import javax.lang.model.element.Element;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    32
import javax.lang.model.element.ExecutableElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    33
import javax.lang.model.element.TypeElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    34
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    35
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    36
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    37
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    38
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    39
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    40
import jdk.javadoc.internal.doclets.toolkit.ConstructorWriter;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    41
import jdk.javadoc.internal.doclets.toolkit.Content;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    42
import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    43
import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    44
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
 * Writes constructor documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    49
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    50
 *  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: 7681
diff changeset
    51
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    52
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    53
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
 * @author Robert Field
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
 * @author Atul M Dambalkar
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
    56
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
    implements ConstructorWriter, MemberSummaryWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    private boolean foundNonPubConstructor = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
     * Construct a new ConstructorWriterImpl.
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
     * @param writer The writer for the class that the constructors belong to.
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    67
     * @param typeElement the class being documented.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    69
    public ConstructorWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    70
        super(writer, typeElement);
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    71
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    72
        VisibleMemberMap visibleMemberMap = new VisibleMemberMap(
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    73
                typeElement,
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    74
                VisibleMemberMap.Kind.CONSTRUCTORS, configuration);
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    75
        SortedSet<Element> constructors = visibleMemberMap.getMembersFor(typeElement);
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    76
        for (Element constructor : constructors) {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    77
            if (utils.isProtected(constructor) || utils.isPrivate(constructor)) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
                setFoundNonPubConstructor(true);
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
     * Construct a new ConstructorWriterImpl.
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
     * @param writer The writer for the class that the constructors belong to.
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    public ConstructorWriterImpl(SubWriterHolderWriter writer) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        super(writer);
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    93
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    95
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
    96
    public Content getMemberSummaryHeader(TypeElement typeElement,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    97
            Content memberSummaryTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    98
        memberSummaryTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_SUMMARY);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    99
        Content memberTree = writer.getMemberTreeHeader();
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   100
        writer.addSummaryHeader(this, typeElement, memberTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   101
        return memberTree;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   105
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
     */
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   107
    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   108
        writer.addMemberTree(memberSummaryTree, memberTree);
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   109
    }
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   110
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   111
    /**
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   112
     * {@inheritDoc}
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   113
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   114
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   115
    public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   116
            Content memberDetailsTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   117
        memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   118
        Content constructorDetailsTree = writer.getMemberTreeHeader();
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   119
        constructorDetailsTree.addContent(writer.getMarkerAnchor(
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   120
                SectionName.CONSTRUCTOR_DETAIL));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   121
        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   122
                writer.constructorDetailsLabel);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   123
        constructorDetailsTree.addContent(heading);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   124
        return constructorDetailsTree;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   128
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   130
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   131
    public Content getConstructorDocTreeHeader(ExecutableElement constructor,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   132
            Content constructorDetailsTree) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        String erasureAnchor;
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        if ((erasureAnchor = getErasureAnchor(constructor)) != null) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   135
            constructorDetailsTree.addContent(writer.getMarkerAnchor((erasureAnchor)));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
        }
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   137
        constructorDetailsTree.addContent(
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   138
                writer.getMarkerAnchor(writer.getAnchor(constructor)));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   139
        Content constructorDocTree = writer.getMemberTreeHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   140
        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   141
        heading.addContent(name(constructor));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   142
        constructorDocTree.addContent(heading);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   143
        return constructorDocTree;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   147
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   149
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   150
    public Content getSignature(ExecutableElement constructor) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   151
        Content pre = new HtmlTree(HtmlTag.PRE);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   152
        writer.addAnnotationInfo(constructor, pre);
31943
72b69ab429c9 8062647: Wrong indentation of arguments of annotated methods
igerasim
parents: 29957
diff changeset
   153
        int annotationLength = pre.charCount();
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   154
        addModifiers(constructor, pre);
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14357
diff changeset
   155
        if (configuration.linksource) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   156
            Content constructorName = new StringContent(name(constructor));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   157
            writer.addSrcLink(constructor, constructorName, pre);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        } else {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   159
            addName(name(constructor), pre);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
        }
31943
72b69ab429c9 8062647: Wrong indentation of arguments of annotated methods
igerasim
parents: 29957
diff changeset
   161
        int indent = pre.charCount() - annotationLength;
17564
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents: 16964
diff changeset
   162
        addParameters(constructor, pre, indent);
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents: 16964
diff changeset
   163
        addExceptions(constructor, pre, indent);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   164
        return pre;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   168
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   170
    @Override
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   171
    public void setSummaryColumnStyle(HtmlTree tdTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   172
        if (foundNonPubConstructor)
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   173
            tdTree.addStyle(HtmlStyle.colLast);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   174
        else
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   175
            tdTree.addStyle(HtmlStyle.colOne);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   179
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   181
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   182
    public void addDeprecated(ExecutableElement constructor, Content constructorDocTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   183
        addDeprecatedInfo(constructor, constructorDocTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   184
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   185
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   186
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   187
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   188
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   189
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   190
    public void addComments(ExecutableElement constructor, Content constructorDocTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   191
        addComment(constructor, constructorDocTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   195
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   197
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   198
    public void addTags(ExecutableElement constructor, Content constructorDocTree) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   199
        writer.addTagsInfo(constructor, constructorDocTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   203
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   205
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   206
    public Content getConstructorDetails(Content constructorDetailsTree) {
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   207
        if (configuration.allowTag(HtmlTag.SECTION)) {
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   208
            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(constructorDetailsTree));
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   209
            return htmlTree;
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   210
        }
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   211
        return getMemberTree(constructorDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   215
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   217
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   218
    public Content getConstructorDoc(Content constructorDocTree,
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   219
            boolean isLastContent) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   220
        return getMemberTree(constructorDocTree, isLastContent);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
     * Close the writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   226
    @Override
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
    public void close() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
        writer.close();
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
     * Let the writer know whether a non public constructor was found.
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
     * @param foundNonPubConstructor true if we found a non public constructor.
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   236
    @Override
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    public void setFoundNonPubConstructor(boolean foundNonPubConstructor) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
        this.foundNonPubConstructor = foundNonPubConstructor;
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   241
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   242
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   243
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   244
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   245
    public void addSummaryLabel(Content memberTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   246
        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   247
                writer.getResource("doclet.Constructor_Summary"));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   248
        memberTree.addContent(label);
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
   249
    }
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
   250
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   251
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   252
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   253
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   254
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   255
    public String getTableSummary() {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14357
diff changeset
   256
        return configuration.getText("doclet.Member_Table_Summary",
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14357
diff changeset
   257
                configuration.getText("doclet.Constructor_Summary"),
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14357
diff changeset
   258
                configuration.getText("doclet.constructors"));
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
   259
    }
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
   260
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   261
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   262
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   263
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   264
    @Override
17570
78512b2899db 8012183: replace some uses of Configuration.getText with Configuration.getResource
jjg
parents: 17564
diff changeset
   265
    public Content getCaption() {
78512b2899db 8012183: replace some uses of Configuration.getText with Configuration.getResource
jjg
parents: 17564
diff changeset
   266
        return configuration.getResource("doclet.Constructors");
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   267
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   268
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   269
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   270
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   271
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   272
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   273
    public List<String> getSummaryTableHeader(Element member) {
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   274
        List<String> header = new ArrayList<>();
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
   275
        if (foundNonPubConstructor) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   276
            header.add(configuration.getText("doclet.Modifier"));
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 2216
diff changeset
   277
        }
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   278
        header.add(configuration.getText("doclet.0_and_1",
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   279
                configuration.getText("doclet.Constructor"),
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   280
                configuration.getText("doclet.Description")));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   281
        return header;
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   282
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   283
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   284
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   285
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   286
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   287
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   288
    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   289
        memberTree.addContent(writer.getMarkerAnchor(
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   290
                SectionName.CONSTRUCTOR_SUMMARY));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   293
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   294
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   295
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   296
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   297
    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   298
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   300
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   301
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   302
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   303
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   304
    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   307
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   308
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   309
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   310
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   311
    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
        if (link) {
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   313
            return writer.getHyperLink(SectionName.CONSTRUCTOR_SUMMARY,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   314
                    writer.getResource("doclet.navConstructor"));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
        } else {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   316
            return writer.getResource("doclet.navConstructor");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   319
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   323
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   324
    protected void addNavDetailLink(boolean link, Content liNav) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   325
        if (link) {
21008
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   326
            liNav.addContent(writer.getHyperLink(
af0b915df7cc 8025633: Fix javadoc to generate valid anchor names
bpatel
parents: 17570
diff changeset
   327
                    SectionName.CONSTRUCTOR_DETAIL,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   328
                    writer.getResource("doclet.navConstructor")));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   329
        } else {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   330
            liNav.addContent(writer.getResource("doclet.navConstructor"));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   331
        }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   332
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   335
     * {@inheritDoc}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   337
    @Override
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   338
    protected void addSummaryType(Element member, Content tdSummaryType) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   339
        if (foundNonPubConstructor) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   340
            Content code = new HtmlTree(HtmlTag.CODE);
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   341
            if (utils.isProtected(member)) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   342
                code.addContent("protected ");
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   343
            } else if (utils.isPrivate(member)) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   344
                code.addContent("private ");
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31943
diff changeset
   345
            } else if (utils.isPublic(member)) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   346
                code.addContent(writer.getSpace());
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   347
            } else {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   348
                code.addContent(
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14357
diff changeset
   349
                        configuration.getText("doclet.Package_private"));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   350
            }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   351
            tdSummaryType.addContent(code);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   352
        }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   353
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
}