1 /* 2 * Copyright (c) 2013, 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 com.sun.tools.doclets.internal.toolkit; 27 28 import java.io.*; 29 30 import com.sun.javadoc.*; 31 32 /** 33 * The interface for writing profile 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 Bhavesh Patel 41 */ 42 43 public interface ProfileSummaryWriter { 44 45 /** 46 * Get the header for the summary. 47 * 48 * @param heading profile name. 49 * @return the header to be added to the content tree 50 */ 51 public abstract Content getProfileHeader(String heading); 52 53 /** 54 * Get the header for the profile content. 55 * 56 * @return a content tree for the profile content header 57 */ 58 public abstract Content getContentHeader(); 59 60 /** 61 * Get the header for the summary header. 62 * 63 * @return a content tree with the summary header 64 */ 65 public abstract Content getSummaryHeader(); 66 67 /** 68 * Get the header for the summary tree. 69 * 70 * @param summaryContentTree the content tree. 71 * @return a content tree with the summary tree 72 */ 73 public abstract Content getSummaryTree(Content summaryContentTree); 74 75 /** 76 * Get the header for the package summary header. 77 * 78 * @return a content tree with the package summary header 79 */ 80 public abstract Content getPackageSummaryHeader(PackageDoc pkg); 81 82 /** 83 * Get the header for the package summary tree. 84 * 85 * @return a content tree with the package summary 86 */ 87 public abstract Content getPackageSummaryTree(Content packageSummaryContentTree); 88 89 /** 90 * Adds the table of classes to the documentation tree. 91 * 92 * @param classes the array of classes to document. 93 * @param label the label for this table. 94 * @param tableSummary the summary string for the table 95 * @param tableHeader array of table headers 96 * @param packageSummaryContentTree the content tree to which the summaries will be added 97 */ 98 public abstract void addClassesSummary(ClassDoc[] classes, String label, 99 String tableSummary, String[] tableHeader, Content packageSummaryContentTree); 100 101 /** 102 * Adds the footer to the documentation tree. 103 * 104 * @param contentTree the tree to which the footer will be added 105 */ 106 public abstract void addProfileFooter(Content contentTree); 107 108 /** 109 * Print the profile summary document. 110 * 111 * @param contentTree the content tree that will be printed 112 */ 113 public abstract void printDocument(Content contentTree) throws IOException; 114 115 /** 116 * Close the writer. 117 */ 118 public abstract void close() throws IOException; 119 120 }