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