src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ModuleSummaryWriter.java
author hannesw
Wed, 27 Nov 2019 13:08:16 +0100
changeset 59294 48b88b9c11eb
parent 47216 71c04702a3d5
permissions -rw-r--r--
8223378: CSS solution for navbar problem with <a> elements is not ideal Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     2
 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * accompanied this code).
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    23
 * questions.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    24
 */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    25
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    26
package jdk.javadoc.internal.doclets.toolkit;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    27
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    28
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    29
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    30
/**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    31
 * The interface for writing module summary output.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    32
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    33
 *  <p><b>This is NOT part of any supported API.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    34
 *  If you write code that depends on this, you do so at your own risk.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    35
 *  This code and its internal interfaces are subject to change or
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    36
 *  deletion without notice.</b>
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    37
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    38
 * @author Bhavesh Patel
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    39
 */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    40
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    41
public interface ModuleSummaryWriter {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    42
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    43
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    44
     * Get the header for the summary.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    45
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    46
     * @param heading module name.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    47
     * @return the header to be added to the content tree
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    48
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    49
    public abstract Content getModuleHeader(String heading);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    50
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    51
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    52
     * Get the header for the module content.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    53
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    54
     * @return a content tree for the module content header
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    55
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    56
    public abstract Content getContentHeader();
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    57
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    58
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    59
     * Get the header for the summary header.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    60
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    61
     * @return a content tree with the summary header
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    62
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    63
    public abstract Content getSummaryHeader();
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    64
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    65
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    66
     * Get the header for the summary tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    67
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    68
     * @param summaryContentTree the content tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    69
     * @return a content tree with the summary tree
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    70
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    71
    public abstract Content getSummaryTree(Content summaryContentTree);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    72
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    73
    /**
37747
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    74
     * Adds the module description.
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    75
     *
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    76
     * @param moduleContentTree the content tree to which the module description
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    77
     *                           will be added
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    78
     */
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    79
    public abstract void addModuleDescription(Content moduleContentTree);
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    80
878801512393 8154119: Module summary page should display module description
bpatel
parents: 36526
diff changeset
    81
    /**
38911
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    82
     * Adds the tag information from the "module-info.java" file to the documentation
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    83
     * tree.
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    84
     *
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    85
     * @param moduleContentTree the content tree to which the module tags will
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    86
     *                           be added
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    87
     */
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    88
    public abstract void addModuleTags(Content moduleContentTree);
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    89
48a00b5ee366 8156077: Support javadoc tags in module documentation
bpatel
parents: 37747
diff changeset
    90
    /**
39670
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
    91
     * Adds the modules summary to the documentation tree.
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    92
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    93
     * @param summaryContentTree the content tree to which the summary will be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    94
     */
39670
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
    95
    public abstract void addModulesSummary(Content summaryContentTree);
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
    96
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
    97
    /**
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
    98
     * Adds the packages summary to the documentation tree.
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
    99
     *
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   100
     * @param summaryContentTree the content tree to which the summary will be added
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   101
     */
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   102
    public abstract void addPackagesSummary(Content summaryContentTree);
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   103
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   104
    /**
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   105
     * Adds the services summary to the documentation tree.
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   106
     *
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   107
     * @param summaryContentTree the content tree to which the summary will be added
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   108
     */
9d1eafbf29c6 8154261: Module summary page should display directives for the module
bpatel
parents: 38911
diff changeset
   109
    public abstract void addServicesSummary(Content summaryContentTree);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   110
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   111
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   112
     * Adds the module content tree to the documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   113
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   114
     * @param moduleContentTree the content tree that will be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   115
     */
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 47216
diff changeset
   116
    public abstract void addModuleContent(Content moduleContentTree);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   117
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   118
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   119
     * Adds the footer to the documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   120
     */
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 47216
diff changeset
   121
    public abstract void addModuleFooter();
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   122
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   123
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   124
     * Print the module summary document.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   125
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   126
     * @param contentTree the content tree that will be printed
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   127
     * @throws DocFileIOException if there is a problem while writing the document
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   128
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   129
    public abstract void printDocument(Content contentTree) throws DocFileIOException;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   130
}