Wed, 01 Dec 2010 11:02:38 -0800
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 class 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 ClassWriter {
46 /**
47 * Get the header of the page.
48 *
49 * @param header the header string to write
50 * @return header content that needs to be added to the documentation
51 */
52 public Content getHeader(String header);
54 /**
55 * Get the class content header.
56 *
57 * @return class content header that needs to be added to the documentation
58 */
59 public Content getClassContentHeader();
61 /**
62 * Add the class tree documentation.
63 *
64 * @param classContentTree class content tree to which the documentation will be added
65 */
66 public void addClassTree(Content classContentTree);
68 /**
69 * Get the class information tree header.
70 *
71 * @return class informaion tree header that needs to be added to the documentation
72 */
73 public Content getClassInfoTreeHeader();
75 /**
76 * Add the type parameter information.
77 *
78 * @param classInfoTree content tree to which the documentation will be added
79 */
80 public void addTypeParamInfo(Content classInfoTree);
82 /**
83 * Add all super interfaces if this is an interface.
84 *
85 * @param classInfoTree content tree to which the documentation will be added
86 */
87 public void addSuperInterfacesInfo(Content classInfoTree);
89 /**
90 * Add all implemented interfaces if this is a class.
91 *
92 * @param classInfoTree content tree to which the documentation will be added
93 */
94 public void addImplementedInterfacesInfo(Content classInfoTree);
96 /**
97 * Add all the classes that extend this one.
98 *
99 * @param classInfoTree content tree to which the documentation will be added
100 */
101 public void addSubClassInfo(Content classInfoTree);
103 /**
104 * Add all the interfaces that extend this one.
105 *
106 * @param classInfoTree content tree to which the documentation will be added
107 */
108 public void addSubInterfacesInfo(Content classInfoTree);
110 /**
111 * If this is an interface, add all classes that implement this
112 * interface.
113 *
114 * @param classInfoTree content tree to which the documentation will be added
115 */
116 public void addInterfaceUsageInfo(Content classInfoTree);
118 /**
119 * If this is an inner class or interface, add the enclosing class or
120 * interface.
121 *
122 * @param classInfoTree content tree to which the documentation will be added
123 */
124 public void addNestedClassInfo (Content classInfoTree);
126 /**
127 * Get the class information.
128 *
129 * @param classInfoTree content tree conatining the class information
130 * @return a content tree for the class
131 */
132 public Content getClassInfo(Content classInfoTree);
134 /**
135 * If this class is deprecated, add the appropriate information.
136 *
137 * @param classInfoTree content tree to which the documentation will be added
138 */
139 public void addClassDeprecationInfo (Content classInfoTree);
141 /**
142 * Add the signature of the current class content tree.
143 *
144 * @param modifiers the modifiers for the signature
145 * @param classInfoTree the class content tree to which the signature will be added
146 */
147 public void addClassSignature(String modifiers, Content classInfoTree);
149 /**
150 * Build the class description.
151 *
152 * @param classInfoTree content tree to which the documentation will be added
153 */
154 public void addClassDescription(Content classInfoTree);
156 /**
157 * Add the tag information for the current class.
158 *
159 * @param classInfoTree content tree to which the tag information will be added
160 */
161 public void addClassTagInfo(Content classInfoTree);
163 /**
164 * Get the member tree header for the class.
165 *
166 * @return a content tree for the member tree header
167 */
168 public Content getMemberTreeHeader();
170 /**
171 * Add the footer of the page.
172 *
173 * @param contentTree content tree to which the footer will be added
174 */
175 public void addFooter(Content contentTree);
177 /**
178 * Print the document.
179 *
180 * @param contentTree content tree that will be printed as a document
181 */
182 public void printDocument(Content contentTree);
184 /**
185 * Close the writer.
186 */
187 public void close() throws IOException;
189 /**
190 * Return the classDoc being documented.
191 *
192 * @return the classDoc being documented.
193 */
194 public ClassDoc getClassDoc();
196 /**
197 * Get the member summary tree.
198 *
199 * @param memberTree the content tree used to build the summary tree
200 * @return a content tree for the member summary
201 */
202 public Content getMemberSummaryTree(Content memberTree);
204 /**
205 * Get the member details tree.
206 *
207 * @param memberTree the content tree used to build the details tree
208 * @return a content tree for the member details
209 */
210 public Content getMemberDetailsTree(Content memberTree);
211 }