duke@1: /* duke@1: * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as duke@1: * published by the Free Software Foundation. Sun designates this duke@1: * particular file as subject to the "Classpath" exception as provided duke@1: * by Sun in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * duke@1: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@1: * CA 95054 USA or visit www.sun.com if you need additional information or duke@1: * have any questions. duke@1: */ duke@1: duke@1: package com.sun.tools.doclets.internal.toolkit; duke@1: duke@1: import com.sun.javadoc.*; duke@1: import java.util.*; duke@1: import java.io.*; duke@1: duke@1: /** duke@1: * The interface for writing constants summary output. duke@1: * duke@1: * This code is not part of an API. duke@1: * It is implementation that is subject to change. duke@1: * Do not use it as an API duke@1: * duke@1: * @author Jamie Ho duke@1: * @since 1.5 duke@1: */ duke@1: duke@1: public interface ConstantsSummaryWriter { duke@1: duke@1: /** duke@1: * Write the header for the summary. duke@1: */ duke@1: public abstract void writeHeader(); duke@1: duke@1: /** duke@1: * Write the footer for the summary. duke@1: */ duke@1: public abstract void writeFooter(); duke@1: duke@1: /** duke@1: * Close the writer. duke@1: */ duke@1: public abstract void close() throws IOException; duke@1: duke@1: /** duke@1: * Write the header for the index. duke@1: */ duke@1: public abstract void writeContentsHeader(); duke@1: duke@1: /** duke@1: * Write the footer for the index. duke@1: */ duke@1: public abstract void writeContentsFooter(); duke@1: duke@1: /** duke@1: * Add the given package name to the index. duke@1: * @param pkg the {@link PackageDoc} to index. duke@1: * @param parsedPackageName the parsed package name. We only Write the duke@1: * first 2 directory levels of the package duke@1: * name. For example, java.lang.ref would be duke@1: * indexed as java.lang.*. duke@1: * @param WriteedPackageHeaders the set of package headers that have already duke@1: * been indexed. We don't want to index duke@1: * something more than once. duke@1: */ duke@1: public abstract void writeLinkToPackageContent(PackageDoc pkg, String parsedPackageName, jjg@74: Set WriteedPackageHeaders); duke@1: duke@1: /** duke@1: * Write the given package name. duke@1: * @param pkg the {@link PackageDoc} to index. duke@1: * @param parsedPackageName the parsed package name. We only Write the duke@1: * first 2 directory levels of the package duke@1: * name. For example, java.lang.ref would be duke@1: * indexed as java.lang.*. duke@1: */ duke@1: public abstract void writePackageName(PackageDoc pkg, duke@1: String parsedPackageName); duke@1: duke@1: /** duke@1: * Write the heading for the current table of constants for a given class. duke@1: * @param cd the class whose constants are being documented. duke@1: */ duke@1: public abstract void writeConstantMembersHeader(ClassDoc cd); duke@1: duke@1: /** duke@1: * Document the given constants. duke@1: * @param cd the class whose constants are being documented. duke@1: * @param fields the constants being documented. duke@1: */ duke@1: public abstract void writeConstantMembers(ClassDoc cd, List fields); duke@1: duke@1: /** duke@1: * Document the given constants. duke@1: * @param cd the class whose constants are being documented. duke@1: */ duke@1: public abstract void writeConstantMembersFooter(ClassDoc cd); duke@1: duke@1: }