langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ProfileSummaryWriter.java
author bpatel
Mon, 21 Jan 2013 00:45:35 -0500
changeset 15723 58a73dac9ee4
permissions -rw-r--r--
8006124: javadoc/doclet should be updated to support profiles Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     1
/*
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     4
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    10
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    15
 * accompanied this code).
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    16
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    20
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    23
 * questions.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    24
 */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    25
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    26
package com.sun.tools.doclets.internal.toolkit;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    27
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    28
import java.io.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    29
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    30
import com.sun.javadoc.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    31
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    32
/**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    33
 * The interface for writing profile summary output.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    34
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    35
 *  <p><b>This is NOT part of any supported API.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    36
 *  If you write code that depends on this, you do so at your own risk.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    37
 *  This code and its internal interfaces are subject to change or
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    38
 *  deletion without notice.</b>
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    39
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    40
 * @author Bhavesh Patel
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    41
 */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    42
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    43
public interface ProfileSummaryWriter {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    44
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    45
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    46
     * Get the header for the summary.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    47
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    48
     * @param heading profile name.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    49
     * @return the header to be added to the content tree
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    50
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    51
    public abstract Content getProfileHeader(String heading);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    52
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    53
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    54
     * Get the header for the profile content.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    55
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    56
     * @return a content tree for the profile content header
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    57
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    58
    public abstract Content getContentHeader();
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    59
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    60
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    61
     * Get the header for the summary header.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    62
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    63
     * @return a content tree with the summary header
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    64
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    65
    public abstract Content getSummaryHeader();
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    66
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    67
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    68
     * Get the header for the summary tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    69
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    70
     * @param summaryContentTree the content tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    71
     * @return a content tree with the summary tree
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    72
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    73
    public abstract Content getSummaryTree(Content summaryContentTree);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    74
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    75
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    76
     * Get the header for the package summary header.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    77
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    78
     * @return a content tree with the package summary header
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    79
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    80
    public abstract Content getPackageSummaryHeader(PackageDoc pkg);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    81
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    82
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    83
     * Get the header for the package summary tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    84
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    85
     * @return a content tree with the package summary
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    86
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    87
    public abstract Content getPackageSummaryTree(Content packageSummaryContentTree);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    88
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    89
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    90
     * Adds the table of classes to the documentation tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    91
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    92
     * @param classes the array of classes to document.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    93
     * @param label the label for this table.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    94
     * @param tableSummary the summary string for the table
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    95
     * @param tableHeader array of table headers
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    96
     * @param packageSummaryContentTree the content tree to which the summaries will be added
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    97
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    98
    public abstract void addClassesSummary(ClassDoc[] classes, String label,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    99
            String tableSummary, String[] tableHeader, Content packageSummaryContentTree);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   100
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   101
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   102
     * Adds the footer to the documentation tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   103
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   104
     * @param contentTree the tree to which the footer will be added
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   105
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   106
    public abstract void addProfileFooter(Content contentTree);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   107
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   108
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   109
     * Print the profile summary document.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   110
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   111
     * @param contentTree the content tree that will be printed
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   112
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   113
    public abstract void printDocument(Content contentTree) throws IOException;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   114
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   115
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   116
     * Close the writer.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   117
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   118
    public abstract void close() throws IOException;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   119
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   120
}