langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
author mcimadamore
Tue, 13 Jan 2009 13:27:14 +0000
changeset 1789 7ac8c0815000
parent 10 06bc494ca11e
child 2320 5b8c377175f4
permissions -rw-r--r--
6765045: Remove rawtypes warnings from langtools Summary: Removed all occurrences of rawtypes warnings from langtools Reviewed-by: jjg, bpatel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
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
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
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
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
 * have any questions.
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
import java.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
import java.lang.reflect.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * Builds the summary for a given package.
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * This code is not part of an API.
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * It is implementation that is subject to change.
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * Do not use it as an API
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * @author Jamie Ho
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * @since 1.5
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
public class PackageSummaryBuilder extends AbstractBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
         * The root element of the package summary XML is {@value}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
        public static final String ROOT = "PackageDoc";
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
         * The package being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
        private PackageDoc packageDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
         * The doclet specific writer that will output the result.
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        private PackageSummaryWriter packageWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
        private PackageSummaryBuilder(Configuration configuration) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
                super(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
         * Construct a new PackageSummaryBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
         * @param configuration the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
         * @param pkg the package being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
         * @param packageWriter the doclet specific writer that will output the
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
         *        result.
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
         *
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
         * @return an instance of a PackageSummaryBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
        public static PackageSummaryBuilder getInstance(
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
                Configuration configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
                PackageDoc pkg,
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
                PackageSummaryWriter packageWriter) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
                PackageSummaryBuilder builder =
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
                        new PackageSummaryBuilder(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
                builder.packageDoc = pkg;
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
                builder.packageWriter = packageWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
                return builder;
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
         * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        public void invokeMethod(
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
                String methodName,
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
    91
                Class<?>[] paramClasses,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
                Object[] params)
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
                throws Exception {
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
                if (DEBUG) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
                        configuration.root.printError(
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
                                "DEBUG: " + this.getClass().getName() + "." + methodName);
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
                Method method = this.getClass().getMethod(methodName, paramClasses);
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
                method.invoke(this, params);
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
         * Build the package summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
        public void build() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
                if (packageWriter == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
                        //Doclet does not support this output.
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
                        return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
                build(LayoutParser.getInstance(configuration).parseXML(ROOT));
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
         * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        public String getName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
                return ROOT;
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
         * Build the package documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
         */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   123
        public void buildPackageDoc(List<?> elements) throws Exception {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
                build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
                packageWriter.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
                Util.copyDocFiles(
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
                        configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
                        Util.getPackageSourcePath(configuration, packageDoc),
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
                        DirectoryManager.getDirectoryPath(packageDoc)
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
                                + File.separator
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
                                + DocletConstants.DOC_FILES_DIR_NAME,
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
                        true);
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 header of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
        public void buildPackageHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
                packageWriter.writePackageHeader(Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
         * Build the description of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        public void buildPackageDescription() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
                if (configuration.nocomment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
                        return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
                packageWriter.writePackageDescription();
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 tags of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
        public void buildPackageTags() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
                if (configuration.nocomment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
                        return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
                packageWriter.writePackageTags();
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
         * Build the package summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
         */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   165
        public void buildSummary(List<?> elements) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
                build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
         * Build the overall header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        public void buildSummaryHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
                packageWriter.writeSummaryHeader();
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
         * Build the overall footer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
        public void buildSummaryFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
                packageWriter.writeSummaryFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
         * Build the summary for the classes in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
        public void buildClassSummary() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
                ClassDoc[] classes =
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
                                ? packageDoc.ordinaryClasses()
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
                                : configuration.classDocCatalog.ordinaryClasses(
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
                if (classes.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
                                classes,
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
                                configuration.getText("doclet.Class_Summary"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
         * Build the summary for the interfaces in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
        public void buildInterfaceSummary() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
                ClassDoc[] interfaces =
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,
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
                                configuration.getText("doclet.Interface_Summary"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
                }
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
         * Build the summary for the enums in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
        public void buildAnnotationTypeSummary() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
                ClassDoc[] annotationTypes =
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
                                ? packageDoc.annotationTypes()
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
                                : configuration.classDocCatalog.annotationTypes(
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
                if (annotationTypes.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
                                annotationTypes,
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
                                configuration.getText("doclet.Annotation_Types_Summary"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
                }
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
         * Build the summary for the enums in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
        public void buildEnumSummary() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
                ClassDoc[] enums =
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
                                ? packageDoc.enums()
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
                                : configuration.classDocCatalog.enums(
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
                if (enums.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
                                enums,
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
                                configuration.getText("doclet.Enum_Summary"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
         * Build the summary for the exceptions in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        public void buildExceptionSummary() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
                ClassDoc[] exceptions =
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
                                ? packageDoc.exceptions()
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
                                : configuration.classDocCatalog.exceptions(
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
                if (exceptions.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
                                exceptions,
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
                                configuration.getText("doclet.Exception_Summary"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
         * Build the summary for the errors in this package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
        public void buildErrorSummary() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
                ClassDoc[] errors =
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
                        packageDoc.isIncluded()
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
                                ? packageDoc.errors()
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
                                : configuration.classDocCatalog.errors(
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
                                        Util.getPackageName(packageDoc));
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
                if (errors.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
                        packageWriter.writeClassesSummary(
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
                                errors,
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
                                configuration.getText("doclet.Error_Summary"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
         * Build the footer of the summary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
        public void buildPackageFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
                packageWriter.writePackageFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
}