src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java

Wed, 01 Dec 2010 11:02:38 -0800

author
bpatel
date
Wed, 01 Dec 2010 11:02:38 -0800
changeset 766
90af8d87741f
parent 554
9d9f26857129
child 798
4868a36f6fd8
permissions
-rw-r--r--

6851834: Javadoc doclet needs a structured approach to generate the output HTML.
Reviewed-by: jjg

     1 /*
     2  * Copyright (c) 2003, 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  */
    27 package com.sun.tools.doclets.internal.toolkit;
    29 import java.io.*;
    30 import com.sun.javadoc.*;
    32 /**
    33  * The interface for writing annotation type output.
    34  *
    35  * This code is not part of an API.
    36  * It is implementation that is subject to change.
    37  * Do not use it as an API.
    38  *
    39  * @author Jamie Ho
    40  * @author Bhavesh Patel (Modified)
    41  * @since 1.5
    42  */
    44 public interface AnnotationTypeWriter {
    46     /**
    47      * Get the header of the page.
    48      *
    49      * @param header the header string to write
    50      * @return a content tree for the header documentation
    51      */
    52     public Content getHeader(String header);
    54     /**
    55      * Get the annotation content header.
    56      *
    57      * @return annotation content header that needs to be added to the documentation
    58      */
    59     public Content getAnnotationContentHeader();
    61     /**
    62      * Get the annotation information tree header.
    63      *
    64      * @return annotation information tree header that needs to be added to the documentation
    65      */
    66     public Content getAnnotationInfoTreeHeader();
    68     /**
    69      * Get the annotation information.
    70      *
    71      * @param annotationInfoTree content tree containing the annotation information
    72      * @return a content tree for the annotation
    73      */
    74     public Content getAnnotationInfo(Content annotationInfoTree);
    76     /**
    77      * Add the signature of the current annotation type.
    78      *
    79      * @param modifiers the modifiers for the signature
    80      * @param annotationInfoTree the annotation content tree to which the signature will be added
    81      */
    82     public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree);
    84     /**
    85      * Build the annotation type description.
    86      *
    87      * @param annotationInfoTree content tree to which the description will be added
    88      */
    89     public void addAnnotationTypeDescription(Content annotationInfoTree);
    91     /**
    92      * Add the tag information for the current annotation type.
    93      *
    94      * @param annotationInfoTree content tree to which the tag information will be added
    95      */
    96     public void addAnnotationTypeTagInfo(Content annotationInfoTree);
    98     /**
    99      * If this annotation is deprecated, add the appropriate information.
   100      *
   101      * @param annotationInfoTree content tree to which the deprecated information will be added
   102      */
   103     public void addAnnotationTypeDeprecationInfo (Content annotationInfoTree);
   105     /**
   106      * Add the annotation type details marker.
   107      *
   108      * @param memberDetails the content tree representing member details marker
   109      */
   110     public void addAnnotationDetailsMarker(Content memberDetails);
   112     /**
   113      * Get the member tree header for the annotation type.
   114      *
   115      * @return a content tree for the member tree header
   116      */
   117     public Content getMemberTreeHeader();
   119     /**
   120      * Get the member tree.
   121      *
   122      * @param memberTree the content tree that will be modified and returned
   123      * @return a content tree for the member
   124      */
   125     public Content getMemberTree(Content memberTree);
   127     /**
   128      * Get the member summary tree.
   129      *
   130      * @param memberTree the content tree that will be used to build the summary tree
   131      * @return a content tree for the member summary
   132      */
   133     public Content getMemberSummaryTree(Content memberTree);
   135     /**
   136      * Get the member details tree.
   137      *
   138      * @param memberTree the content tree that will be used to build the details tree
   139      * @return a content tree for the member details
   140      */
   141     public Content getMemberDetailsTree(Content memberTree);
   143     /**
   144      * Add the footer of the page.
   145      *
   146      * @param contentTree content tree to which the footer will be added
   147      */
   148     public void addFooter(Content contentTree);
   150     /**
   151      * Print the document.
   152      *
   153      * @param contentTree content tree that will be printed as a document
   154      */
   155     public void printDocument(Content contentTree);
   157     /**
   158      * Close the writer.
   159      */
   160     public void close() throws IOException;
   162     /**
   163      * Return the {@link AnnotationTypeDoc} being documented.
   164      *
   165      * @return the AnnotationTypeDoc being documented.
   166      */
   167     public AnnotationTypeDoc getAnnotationTypeDoc();
   168 }

mercurial