0N/A/*
797N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
553N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
553N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
0N/A */
0N/A
0N/Apackage com.sun.tools.doclets.internal.toolkit;
0N/A
0N/Aimport java.util.*;
0N/Aimport java.io.*;
765N/Aimport com.sun.javadoc.*;
0N/A
0N/A/**
0N/A * The interface for writing constants summary output.
0N/A *
0N/A * This code is not part of an API.
0N/A * It is implementation that is subject to change.
0N/A * Do not use it as an API
0N/A *
0N/A * @author Jamie Ho
765N/A * @author Bhavesh Patel (Modified)
0N/A * @since 1.5
0N/A */
0N/A
0N/Apublic interface ConstantsSummaryWriter {
0N/A
0N/A /**
0N/A * Close the writer.
0N/A */
0N/A public abstract void close() throws IOException;
0N/A
0N/A /**
765N/A * Get the header for the constant summary documentation.
765N/A *
765N/A * @return header that needs to be added to the documentation
0N/A */
765N/A public abstract Content getHeader();
0N/A
0N/A /**
765N/A * Get the header for the constant content list.
765N/A *
765N/A * @return content header that needs to be added to the documentation
0N/A */
765N/A public abstract Content getContentsHeader();
0N/A
0N/A /**
765N/A * Adds the given package name link to the constant content list tree.
765N/A *
0N/A * @param pkg the {@link PackageDoc} to index.
0N/A * @param parsedPackageName the parsed package name. We only Write the
0N/A * first 2 directory levels of the package
0N/A * name. For example, java.lang.ref would be
0N/A * indexed as java.lang.*.
0N/A * @param WriteedPackageHeaders the set of package headers that have already
0N/A * been indexed. We don't want to index
0N/A * something more than once.
765N/A * @param contentListTree the content tree to which the link will be added
0N/A */
765N/A public abstract void addLinkToPackageContent(PackageDoc pkg, String parsedPackageName,
765N/A Set<String> WriteedPackageHeaders, Content contentListTree);
0N/A
0N/A /**
765N/A * Get the content list to be added to the documentation tree.
765N/A *
765N/A * @param contentListTree the content that will be added to the list
765N/A * @return content list that will be added to the documentation tree
0N/A */
765N/A public abstract Content getContentsList(Content contentListTree);
765N/A
765N/A /**
765N/A * Get the constant summaries for the document.
765N/A *
765N/A * @return constant summaries header to be added to the documentation tree
765N/A */
765N/A public abstract Content getConstantSummaries();
0N/A
0N/A /**
765N/A * Adds the given package name.
765N/A *
765N/A * @param pkg the {@link PackageDoc} to index.
765N/A * @param parsedPackageName the parsed package name. We only Write the
765N/A * first 2 directory levels of the package
765N/A * name. For example, java.lang.ref would be
765N/A * indexed as java.lang.*.
765N/A * @param summariesTree the documentation tree to which the package name will
765N/A * be written
0N/A */
765N/A public abstract void addPackageName(PackageDoc pkg,
765N/A String parsedPackageName, Content summariesTree);
0N/A
0N/A /**
765N/A * Get the class summary header for the constants summary.
765N/A *
765N/A * @return the header content for the class constants summary
765N/A */
765N/A public abstract Content getClassConstantHeader();
765N/A
765N/A /**
765N/A * Adds the constant member table to the documentation tree.
765N/A *
0N/A * @param cd the class whose constants are being documented.
0N/A * @param fields the constants being documented.
765N/A * @param classConstantTree the documentation tree to which theconstant member
765N/A * table content will be added
0N/A */
765N/A public abstract void addConstantMembers(ClassDoc cd, List<FieldDoc> fields,
765N/A Content classConstantTree);
0N/A
0N/A /**
765N/A * Adds the footer for the summary documentation.
765N/A *
765N/A * @param contentTree content tree to which the footer will be added
0N/A */
765N/A public abstract void addFooter(Content contentTree);
765N/A
765N/A /**
765N/A * Print the constants summary document.
765N/A *
765N/A * @param contentTree content tree which should be printed
765N/A */
765N/A public abstract void printDocument(Content contentTree);
0N/A
0N/A}