Wed, 01 Dec 2010 11:02:38 -0800
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
Reviewed-by: jjg
duke@1 | 1 | /* |
ohair@554 | 2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | * |
duke@1 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@554 | 7 | * published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@554 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | * |
duke@1 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | * accompanied this code). |
duke@1 | 16 | * |
duke@1 | 17 | * You should have received a copy of the GNU General Public License version |
duke@1 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | * |
ohair@554 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@554 | 23 | * questions. |
duke@1 | 24 | */ |
duke@1 | 25 | |
duke@1 | 26 | |
duke@1 | 27 | package com.sun.tools.doclets.internal.toolkit; |
duke@1 | 28 | |
duke@1 | 29 | import java.io.*; |
duke@1 | 30 | import com.sun.javadoc.*; |
duke@1 | 31 | |
duke@1 | 32 | /** |
duke@1 | 33 | * The interface for writing annotation type output. |
duke@1 | 34 | * |
duke@1 | 35 | * This code is not part of an API. |
duke@1 | 36 | * It is implementation that is subject to change. |
duke@1 | 37 | * Do not use it as an API. |
duke@1 | 38 | * |
duke@1 | 39 | * @author Jamie Ho |
bpatel@766 | 40 | * @author Bhavesh Patel (Modified) |
duke@1 | 41 | * @since 1.5 |
duke@1 | 42 | */ |
duke@1 | 43 | |
duke@1 | 44 | public interface AnnotationTypeWriter { |
duke@1 | 45 | |
duke@1 | 46 | /** |
bpatel@766 | 47 | * Get the header of the page. |
bpatel@766 | 48 | * |
bpatel@766 | 49 | * @param header the header string to write |
bpatel@766 | 50 | * @return a content tree for the header documentation |
duke@1 | 51 | */ |
bpatel@766 | 52 | public Content getHeader(String header); |
duke@1 | 53 | |
duke@1 | 54 | /** |
bpatel@766 | 55 | * Get the annotation content header. |
duke@1 | 56 | * |
bpatel@766 | 57 | * @return annotation content header that needs to be added to the documentation |
duke@1 | 58 | */ |
bpatel@766 | 59 | public Content getAnnotationContentHeader(); |
bpatel@766 | 60 | |
bpatel@766 | 61 | /** |
bpatel@766 | 62 | * Get the annotation information tree header. |
bpatel@766 | 63 | * |
bpatel@766 | 64 | * @return annotation information tree header that needs to be added to the documentation |
bpatel@766 | 65 | */ |
bpatel@766 | 66 | public Content getAnnotationInfoTreeHeader(); |
bpatel@766 | 67 | |
bpatel@766 | 68 | /** |
bpatel@766 | 69 | * Get the annotation information. |
bpatel@766 | 70 | * |
bpatel@766 | 71 | * @param annotationInfoTree content tree containing the annotation information |
bpatel@766 | 72 | * @return a content tree for the annotation |
bpatel@766 | 73 | */ |
bpatel@766 | 74 | public Content getAnnotationInfo(Content annotationInfoTree); |
bpatel@766 | 75 | |
bpatel@766 | 76 | /** |
bpatel@766 | 77 | * Add the signature of the current annotation type. |
bpatel@766 | 78 | * |
bpatel@766 | 79 | * @param modifiers the modifiers for the signature |
bpatel@766 | 80 | * @param annotationInfoTree the annotation content tree to which the signature will be added |
bpatel@766 | 81 | */ |
bpatel@766 | 82 | public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree); |
duke@1 | 83 | |
duke@1 | 84 | /** |
duke@1 | 85 | * Build the annotation type description. |
bpatel@766 | 86 | * |
bpatel@766 | 87 | * @param annotationInfoTree content tree to which the description will be added |
duke@1 | 88 | */ |
bpatel@766 | 89 | public void addAnnotationTypeDescription(Content annotationInfoTree); |
duke@1 | 90 | |
duke@1 | 91 | /** |
bpatel@766 | 92 | * Add the tag information for the current annotation type. |
bpatel@766 | 93 | * |
bpatel@766 | 94 | * @param annotationInfoTree content tree to which the tag information will be added |
duke@1 | 95 | */ |
bpatel@766 | 96 | public void addAnnotationTypeTagInfo(Content annotationInfoTree); |
duke@1 | 97 | |
duke@1 | 98 | /** |
bpatel@766 | 99 | * If this annotation is deprecated, add the appropriate information. |
bpatel@766 | 100 | * |
bpatel@766 | 101 | * @param annotationInfoTree content tree to which the deprecated information will be added |
duke@1 | 102 | */ |
bpatel@766 | 103 | public void addAnnotationTypeDeprecationInfo (Content annotationInfoTree); |
duke@1 | 104 | |
duke@1 | 105 | /** |
bpatel@766 | 106 | * Add the annotation type details marker. |
bpatel@766 | 107 | * |
bpatel@766 | 108 | * @param memberDetails the content tree representing member details marker |
duke@1 | 109 | */ |
bpatel@766 | 110 | public void addAnnotationDetailsMarker(Content memberDetails); |
bpatel@766 | 111 | |
bpatel@766 | 112 | /** |
bpatel@766 | 113 | * Get the member tree header for the annotation type. |
bpatel@766 | 114 | * |
bpatel@766 | 115 | * @return a content tree for the member tree header |
bpatel@766 | 116 | */ |
bpatel@766 | 117 | public Content getMemberTreeHeader(); |
bpatel@766 | 118 | |
bpatel@766 | 119 | /** |
bpatel@766 | 120 | * Get the member tree. |
bpatel@766 | 121 | * |
bpatel@766 | 122 | * @param memberTree the content tree that will be modified and returned |
bpatel@766 | 123 | * @return a content tree for the member |
bpatel@766 | 124 | */ |
bpatel@766 | 125 | public Content getMemberTree(Content memberTree); |
bpatel@766 | 126 | |
bpatel@766 | 127 | /** |
bpatel@766 | 128 | * Get the member summary tree. |
bpatel@766 | 129 | * |
bpatel@766 | 130 | * @param memberTree the content tree that will be used to build the summary tree |
bpatel@766 | 131 | * @return a content tree for the member summary |
bpatel@766 | 132 | */ |
bpatel@766 | 133 | public Content getMemberSummaryTree(Content memberTree); |
bpatel@766 | 134 | |
bpatel@766 | 135 | /** |
bpatel@766 | 136 | * Get the member details tree. |
bpatel@766 | 137 | * |
bpatel@766 | 138 | * @param memberTree the content tree that will be used to build the details tree |
bpatel@766 | 139 | * @return a content tree for the member details |
bpatel@766 | 140 | */ |
bpatel@766 | 141 | public Content getMemberDetailsTree(Content memberTree); |
bpatel@766 | 142 | |
bpatel@766 | 143 | /** |
bpatel@766 | 144 | * Add the footer of the page. |
bpatel@766 | 145 | * |
bpatel@766 | 146 | * @param contentTree content tree to which the footer will be added |
bpatel@766 | 147 | */ |
bpatel@766 | 148 | public void addFooter(Content contentTree); |
bpatel@766 | 149 | |
bpatel@766 | 150 | /** |
bpatel@766 | 151 | * Print the document. |
bpatel@766 | 152 | * |
bpatel@766 | 153 | * @param contentTree content tree that will be printed as a document |
bpatel@766 | 154 | */ |
bpatel@766 | 155 | public void printDocument(Content contentTree); |
duke@1 | 156 | |
duke@1 | 157 | /** |
duke@1 | 158 | * Close the writer. |
duke@1 | 159 | */ |
duke@1 | 160 | public void close() throws IOException; |
duke@1 | 161 | |
duke@1 | 162 | /** |
duke@1 | 163 | * Return the {@link AnnotationTypeDoc} being documented. |
duke@1 | 164 | * |
duke@1 | 165 | * @return the AnnotationTypeDoc being documented. |
duke@1 | 166 | */ |
duke@1 | 167 | public AnnotationTypeDoc getAnnotationTypeDoc(); |
duke@1 | 168 | } |