Mon, 15 Oct 2012 17:07:55 -0700
8000666: javadoc should write directly to Writer instead of composing strings
Reviewed-by: bpatel
1 /*
2 * Copyright (c) 2003, 2012, 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 */
26 package com.sun.tools.doclets.internal.toolkit;
28 import java.io.*;
30 import com.sun.javadoc.*;
32 /**
33 * The interface for writing package summary output.
34 *
35 * <p><b>This is NOT part of any supported API.
36 * If you write code that depends on this, you do so at your own risk.
37 * This code and its internal interfaces are subject to change or
38 * deletion without notice.</b>
39 *
40 * @author Jamie Ho
41 * @author Bhavesh Patel (Modified)
42 * @since 1.5
43 */
45 public interface PackageSummaryWriter {
47 /**
48 * Return the name of the output file.
49 *
50 * @return the name of the output file.
51 */
52 public abstract String getOutputFileName();
54 /**
55 * Get the header for the summary.
56 *
57 * @param heading Package name.
58 * @return the header to be added to the content tree
59 */
60 public abstract Content getPackageHeader(String heading);
62 /**
63 * Get the header for the package content.
64 *
65 * @return a content tree for the package content header
66 */
67 public abstract Content getContentHeader();
69 /**
70 * Get the header for the package summary.
71 *
72 * @return a content tree with the package summary header
73 */
74 public abstract Content getSummaryHeader();
76 /**
77 * Adds the table of classes to the documentation tree.
78 *
79 * @param classes the array of classes to document.
80 * @param label the label for this table.
81 * @param tableSummary the summary string for the table
82 * @param tableHeader array of table headers
83 * @param summaryContentTree the content tree to which the summaries will be added
84 */
85 public abstract void addClassesSummary(ClassDoc[] classes, String label,
86 String tableSummary, String[] tableHeader, Content summaryContentTree);
88 /**
89 * Adds the package description from the "packages.html" file to the documentation
90 * tree.
91 *
92 * @param packageContentTree the content tree to which the package description
93 * will be added
94 */
95 public abstract void addPackageDescription(Content packageContentTree);
97 /**
98 * Adds the tag information from the "packages.html" file to the documentation
99 * tree.
100 *
101 * @param packageContentTree the content tree to which the package tags will
102 * be added
103 */
104 public abstract void addPackageTags(Content packageContentTree);
106 /**
107 * Adds the footer to the documentation tree.
108 *
109 * @param contentTree the tree to which the footer will be added
110 */
111 public abstract void addPackageFooter(Content contentTree);
113 /**
114 * Print the package summary document.
115 *
116 * @param contentTree the content tree that will be printed
117 */
118 public abstract void printDocument(Content contentTree) throws IOException;
120 /**
121 * Close the writer.
122 */
123 public abstract void close() throws IOException;
125 }