langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
author jjg
Fri, 18 Jun 2010 21:13:56 -0700
changeset 5855 00d9c252e60c
parent 5520 86e4b9a9da40
child 7614 cfadc977ca75
permissions -rw-r--r--
6961178: Allow doclet.xml to contain XML attributes Reviewed-by: bpatel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
     2
 * Copyright (c) 2003, 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
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.doclets.internal.toolkit.builders;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import com.sun.tools.doclets.internal.toolkit.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import com.sun.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import java.io.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
 * Builds the summary for a given package.
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * This code is not part of an API.
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * It is implementation that is subject to change.
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * Do not use it as an API
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * @author Jamie Ho
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    41
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * @since 1.5
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
public class PackageSummaryBuilder extends AbstractBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
         * The root element of the package summary XML is {@value}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
        public static final String ROOT = "PackageDoc";
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 package being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
        private PackageDoc packageDoc;
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 that will output the result.
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
        private PackageSummaryWriter packageWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
        private PackageSummaryBuilder(Configuration configuration) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
                super(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
         * Construct a new PackageSummaryBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
         * @param configuration the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
         * @param pkg the package being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
         * @param packageWriter the doclet specific writer that will output the
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
         *        result.
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
         *
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
         * @return an instance of a PackageSummaryBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
        public static PackageSummaryBuilder getInstance(
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
                Configuration configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
                PackageDoc pkg,
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
                PackageSummaryWriter packageWriter) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
                PackageSummaryBuilder builder =
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
                        new PackageSummaryBuilder(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
                builder.packageDoc = pkg;
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
                builder.packageWriter = packageWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
                return builder;
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
         * Build the package summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
        public void build() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
                if (packageWriter == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
                        //Doclet does not support this output.
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
                        return;
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
                build(LayoutParser.getInstance(configuration).parseXML(ROOT));
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
         * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        public String getName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
                return ROOT;
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
         * Build the package documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   106
        public void buildPackageDoc(XMLNode node) throws Exception {
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   107
                buildChildren(node);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
                packageWriter.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
                Util.copyDocFiles(
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
                        configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
                        Util.getPackageSourcePath(configuration, packageDoc),
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
                        DirectoryManager.getDirectoryPath(packageDoc)
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
                                + File.separator
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
                                + DocletConstants.DOC_FILES_DIR_NAME,
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
                        true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
         * Build the header of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   121
        public void buildPackageHeader(XMLNode node) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
                packageWriter.writePackageHeader(Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
         * Build the description of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   128
        public void buildPackageDescription(XMLNode node) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
                if (configuration.nocomment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
                        return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
                packageWriter.writePackageDescription();
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
         * Build the tags of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   138
        public void buildPackageTags(XMLNode node) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
                if (configuration.nocomment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
                        return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
                packageWriter.writePackageTags();
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
         * Build the package summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   148
        public void buildSummary(XMLNode node) {
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   149
                buildChildren(node);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
         * Build the overall header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   155
        public void buildSummaryHeader(XMLNode node) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
                packageWriter.writeSummaryHeader();
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
         * Build the overall footer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   162
        public void buildSummaryFooter(XMLNode node) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
                packageWriter.writeSummaryFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
         * Build the summary for the classes in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   169
        public void buildClassSummary(XMLNode node) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   170
            String classTableSummary =
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   171
                    configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   172
                    configuration.getText("doclet.Class_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   173
                    configuration.getText("doclet.classes"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   174
            String[] classTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   175
                configuration.getText("doclet.Class"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   176
                configuration.getText("doclet.Description")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   177
            };
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   178
            ClassDoc[] classes =
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
                                ? packageDoc.ordinaryClasses()
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
                                : configuration.classDocCatalog.ordinaryClasses(
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
                if (classes.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
                                classes,
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   186
                                configuration.getText("doclet.Class_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   187
                                classTableSummary, classTableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
         * Build the summary for the interfaces in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   194
        public void buildInterfaceSummary(XMLNode node) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   195
            String interfaceTableSummary =
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   196
                    configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   197
                    configuration.getText("doclet.Interface_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   198
                    configuration.getText("doclet.interfaces"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   199
            String[] interfaceTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   200
                configuration.getText("doclet.Interface"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   201
                configuration.getText("doclet.Description")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   202
            };
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   203
            ClassDoc[] interfaces =
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
                                ? packageDoc.interfaces()
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
                                : configuration.classDocCatalog.interfaces(
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
                if (interfaces.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
                                interfaces,
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   211
                                configuration.getText("doclet.Interface_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   212
                                interfaceTableSummary, interfaceTableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
         * Build the summary for the enums in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   219
        public void buildAnnotationTypeSummary(XMLNode node) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   220
            String annotationtypeTableSummary =
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   221
                    configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   222
                    configuration.getText("doclet.Annotation_Types_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   223
                    configuration.getText("doclet.annotationtypes"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   224
            String[] annotationtypeTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   225
                configuration.getText("doclet.AnnotationType"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   226
                configuration.getText("doclet.Description")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   227
            };
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   228
            ClassDoc[] annotationTypes =
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
                                ? packageDoc.annotationTypes()
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
                                : configuration.classDocCatalog.annotationTypes(
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
                if (annotationTypes.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
                                annotationTypes,
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   236
                                configuration.getText("doclet.Annotation_Types_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   237
                                annotationtypeTableSummary, annotationtypeTableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
         * Build the summary for the enums in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   244
        public void buildEnumSummary(XMLNode node) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   245
            String enumTableSummary =
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   246
                    configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   247
                    configuration.getText("doclet.Enum_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   248
                    configuration.getText("doclet.enums"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   249
            String[] enumTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   250
                configuration.getText("doclet.Enum"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   251
                configuration.getText("doclet.Description")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   252
            };
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   253
            ClassDoc[] enums =
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
                                ? packageDoc.enums()
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
                                : configuration.classDocCatalog.enums(
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
                if (enums.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
                                enums,
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   261
                                configuration.getText("doclet.Enum_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   262
                                enumTableSummary, enumTableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
         * Build the summary for the exceptions in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   269
        public void buildExceptionSummary(XMLNode node) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   270
            String exceptionTableSummary =
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   271
                    configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   272
                    configuration.getText("doclet.Exception_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   273
                    configuration.getText("doclet.exceptions"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   274
            String[] exceptionTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   275
                configuration.getText("doclet.Exception"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   276
                configuration.getText("doclet.Description")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   277
            };
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   278
            ClassDoc[] exceptions =
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
                                ? packageDoc.exceptions()
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
                                : configuration.classDocCatalog.exceptions(
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
                if (exceptions.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
                                exceptions,
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   286
                                configuration.getText("doclet.Exception_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   287
                                exceptionTableSummary, exceptionTableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   290
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
         * Build the summary for the errors in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   293
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   294
        public void buildErrorSummary(XMLNode node) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   295
            String errorTableSummary =
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   296
                    configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   297
                    configuration.getText("doclet.Error_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   298
                    configuration.getText("doclet.errors"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   299
            String[] errorTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   300
                configuration.getText("doclet.Error"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   301
                configuration.getText("doclet.Description")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   302
            };
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   303
            ClassDoc[] errors =
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   304
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
                                ? packageDoc.errors()
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
                                : configuration.classDocCatalog.errors(
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
                if (errors.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   310
                                errors,
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   311
                                configuration.getText("doclet.Error_Summary"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   312
                                errorTableSummary, errorTableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
         * Build the footer of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
         */
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   319
        public void buildPackageFooter(XMLNode node) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
                packageWriter.writePackageFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
}