001/* 002 * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. 003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 004 * 005 * This code is free software; you can redistribute it and/or modify it 006 * under the terms of the GNU General Public License version 2 only, as 007 * published by the Free Software Foundation. Oracle designates this 008 * particular file as subject to the "Classpath" exception as provided 009 * by Oracle in the LICENSE file that accompanied this code. 010 * 011 * This code is distributed in the hope that it will be useful, but WITHOUT 012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 014 * version 2 for more details (a copy is included in the LICENSE file that 015 * accompanied this code). 016 * 017 * You should have received a copy of the GNU General Public License version 018 * 2 along with this work; if not, write to the Free Software Foundation, 019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 020 * 021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 022 * or visit www.oracle.com if you need additional information or have any 023 * questions. 024 */ 025 026package org.jdrupes.mdoclet.internal.doclets.toolkit; 027 028import java.util.List; 029import java.util.SortedSet; 030 031import javax.lang.model.element.PackageElement; 032import javax.lang.model.element.TypeElement; 033 034import org.jdrupes.mdoclet.internal.doclets.toolkit.util.DocFileIOException; 035 036/** 037 * The interface for writing package summary output. 038 */ 039public interface PackageSummaryWriter { 040 041 /** 042 * Get the header for the summary. 043 * 044 * @return the header to be added to the content 045 */ 046 Content getPackageHeader(); 047 048 /** 049 * Get the header for the package content. 050 * 051 * @return the package content header 052 */ 053 Content getContentHeader(); 054 055 /** 056 * Get the header for the package summary. 057 * 058 * @return the package summary header 059 */ 060 Content getSummariesList(); 061 062 /** 063 * Adds the table of related packages to the documentation. 064 * 065 * @param summaryContent the content to which the summaries will be added 066 */ 067 void addRelatedPackagesSummary(Content summaryContent); 068 069 /** 070 * Adds the table of all classes and interfaces to the documentation. 071 * 072 * @param summaryContent the content to which the summaries will be added 073 */ 074 void addAllClassesAndInterfacesSummary(Content summaryContent); 075 076 /** 077 * Adds the package description from the "packages.html" file to the documentation. 078 * 079 * @param packageContent the content to which the package description 080 * will be added 081 */ 082 void addPackageDescription(Content packageContent); 083 084 /** 085 * Adds the tag information from the "packages.html" file to the documentation. 086 * 087 * @param packageContent the content to which the package tags will 088 * be added 089 */ 090 void addPackageTags(Content packageContent); 091 092 /** 093 * Adds the package signature. 094 * 095 * @param packageContent the content to which the package signature 096 * will be added 097 */ 098 void addPackageSignature(Content packageContent); 099 100 /** 101 * Adds the tag information from the "packages.html" or "package-info.java" file to the 102 * documentation. 103 * 104 * @param packageContent the package content to be added 105 */ 106 void addPackageContent(Content packageContent); 107 108 /** 109 * Adds the footer to the documentation. 110 */ 111 void addPackageFooter(); 112 113 /** 114 * Print the package summary document. 115 * 116 * @param content the content that will be printed 117 * @throws DocFileIOException if there is a problem while writing the document 118 */ 119 void printDocument(Content content) throws DocFileIOException; 120 121 /** 122 * Gets the package summary. 123 * @param summaryContent the content representing the package summary 124 * @return the package summary 125 */ 126 Content getPackageSummary(Content summaryContent); 127}