author | jjg |
Fri, 27 May 2016 13:06:58 -0700 | |
changeset 38617 | d93a7f64e231 |
parent 36526 | 3b41f1c69604 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
36526 | 2 |
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 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 |
* |
|
5520 | 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. |
|
10 | 24 |
*/ |
25 |
||
26 |
package com.sun.tools.doclets.internal.toolkit; |
|
27 |
||
14258 | 28 |
import com.sun.javadoc.*; |
10 | 29 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
30 |
||
31 |
/** |
|
32 |
* The interface for a factory creates writers. |
|
33 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
34 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
35 |
* If you write code that depends on this, you do so at your own risk. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
36 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
37 |
* deletion without notice.</b> |
10 | 38 |
* |
39 |
* @author Jamie Ho |
|
40 |
* @since 1.4 |
|
41 |
*/ |
|
42 |
||
38617 | 43 |
@Deprecated |
10 | 44 |
public interface WriterFactory { |
45 |
||
46 |
/** |
|
47 |
* Return the writer for the constant summary. |
|
48 |
* |
|
49 |
* @return the writer for the constant summary. Return null if this |
|
50 |
* writer is not supported by the doclet. |
|
51 |
*/ |
|
52 |
public abstract ConstantsSummaryWriter getConstantsSummaryWriter() |
|
53 |
throws Exception; |
|
54 |
||
55 |
/** |
|
56 |
* Return the writer for the package summary. |
|
57 |
* |
|
58 |
* @param packageDoc the package being documented. |
|
59 |
* @param prevPkg the previous package that was documented. |
|
60 |
* @param nextPkg the next package being documented. |
|
61 |
* @return the writer for the package summary. Return null if this |
|
62 |
* writer is not supported by the doclet. |
|
63 |
*/ |
|
64 |
public abstract PackageSummaryWriter getPackageSummaryWriter(PackageDoc |
|
65 |
packageDoc, PackageDoc prevPkg, PackageDoc nextPkg) |
|
66 |
throws Exception; |
|
67 |
||
68 |
/** |
|
69 |
* Return the writer for a class. |
|
70 |
* |
|
71 |
* @param classDoc the class being documented. |
|
72 |
* @param prevClass the previous class that was documented. |
|
73 |
* @param nextClass the next class being documented. |
|
74 |
* @param classTree the class tree. |
|
75 |
* @return the writer for the class. Return null if this |
|
76 |
* writer is not supported by the doclet. |
|
77 |
*/ |
|
78 |
public abstract ClassWriter getClassWriter(ClassDoc classDoc, |
|
79 |
ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree) |
|
80 |
throws Exception; |
|
81 |
||
82 |
/** |
|
83 |
* Return the writer for an annotation type. |
|
84 |
* |
|
85 |
* @param annotationType the type being documented. |
|
86 |
* @param prevType the previous type that was documented. |
|
87 |
* @param nextType the next type being documented. |
|
88 |
* @return the writer for the annotation type. Return null if this |
|
89 |
* writer is not supported by the doclet. |
|
90 |
*/ |
|
91 |
public abstract AnnotationTypeWriter getAnnotationTypeWriter( |
|
92 |
AnnotationTypeDoc annotationType, Type prevType, Type nextType) |
|
93 |
throws Exception; |
|
94 |
||
95 |
/** |
|
96 |
* Return the method writer for a given class. |
|
97 |
* |
|
98 |
* @param classWriter the writer for the class being documented. |
|
99 |
* @return the method writer for the give class. Return null if this |
|
100 |
* writer is not supported by the doclet. |
|
101 |
*/ |
|
102 |
public abstract MethodWriter getMethodWriter(ClassWriter classWriter) |
|
103 |
throws Exception; |
|
104 |
||
105 |
/** |
|
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
106 |
* Return the annotation type field writer for a given annotation type. |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
107 |
* |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
108 |
* @param annotationTypeWriter the writer for the annotation type |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
109 |
* being documented. |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
110 |
* @return the member writer for the given annotation type. Return null if |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
111 |
* this writer is not supported by the doclet. |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
112 |
*/ |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
113 |
public abstract AnnotationTypeFieldWriter |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
114 |
getAnnotationTypeFieldWriter( |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
115 |
AnnotationTypeWriter annotationTypeWriter) throws Exception; |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
116 |
|
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
117 |
/** |
10 | 118 |
* Return the annotation type optional member writer for a given annotation |
119 |
* type. |
|
120 |
* |
|
121 |
* @param annotationTypeWriter the writer for the annotation type |
|
122 |
* being documented. |
|
123 |
* @return the member writer for the given annotation type. Return null if |
|
124 |
* this writer is not supported by the doclet. |
|
125 |
*/ |
|
126 |
public abstract AnnotationTypeOptionalMemberWriter |
|
127 |
getAnnotationTypeOptionalMemberWriter( |
|
128 |
AnnotationTypeWriter annotationTypeWriter) throws Exception; |
|
129 |
||
130 |
/** |
|
131 |
* Return the annotation type required member writer for a given annotation type. |
|
132 |
* |
|
133 |
* @param annotationTypeWriter the writer for the annotation type |
|
134 |
* being documented. |
|
135 |
* @return the member writer for the given annotation type. Return null if |
|
136 |
* this writer is not supported by the doclet. |
|
137 |
*/ |
|
138 |
public abstract AnnotationTypeRequiredMemberWriter |
|
139 |
getAnnotationTypeRequiredMemberWriter( |
|
140 |
AnnotationTypeWriter annotationTypeWriter) throws Exception; |
|
141 |
||
142 |
/** |
|
143 |
* Return the enum constant writer for a given class. |
|
144 |
* |
|
145 |
* @param classWriter the writer for the class being documented. |
|
146 |
* @return the enum constant writer for the give class. Return null if this |
|
147 |
* writer is not supported by the doclet. |
|
148 |
*/ |
|
149 |
public abstract EnumConstantWriter getEnumConstantWriter( |
|
150 |
ClassWriter classWriter) throws Exception; |
|
151 |
||
152 |
/** |
|
153 |
* Return the field writer for a given class. |
|
154 |
* |
|
155 |
* @param classWriter the writer for the class being documented. |
|
156 |
* @return the field writer for the give class. Return null if this |
|
157 |
* writer is not supported by the doclet. |
|
158 |
*/ |
|
159 |
public abstract FieldWriter getFieldWriter(ClassWriter classWriter) |
|
160 |
throws Exception; |
|
161 |
||
162 |
/** |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
163 |
* Return the property writer for a given class. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
164 |
* |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
165 |
* @param classWriter the writer for the class being documented. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
166 |
* @return the property writer for the give class. Return null if this |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
167 |
* writer is not supported by the doclet. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
168 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
169 |
public abstract PropertyWriter getPropertyWriter(ClassWriter classWriter) |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
170 |
throws Exception; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
171 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
172 |
/** |
10 | 173 |
* Return the constructor writer for a given class. |
174 |
* |
|
175 |
* @param classWriter the writer for the class being documented. |
|
176 |
* @return the method writer for the give class. Return null if this |
|
177 |
* writer is not supported by the doclet. |
|
178 |
*/ |
|
179 |
public abstract ConstructorWriter getConstructorWriter( |
|
180 |
ClassWriter classWriter) |
|
181 |
throws Exception; |
|
182 |
||
183 |
/** |
|
184 |
* Return the specified member summary writer for a given class. |
|
185 |
* |
|
186 |
* @param classWriter the writer for the class being documented. |
|
187 |
* @param memberType the {@link VisibleMemberMap} member type indicating |
|
188 |
* the type of member summary that should be returned. |
|
189 |
* @return the summary writer for the give class. Return null if this |
|
190 |
* writer is not supported by the doclet. |
|
191 |
* |
|
192 |
* @see VisibleMemberMap |
|
193 |
* @throws IllegalArgumentException if memberType is unknown. |
|
194 |
*/ |
|
195 |
public abstract MemberSummaryWriter getMemberSummaryWriter( |
|
196 |
ClassWriter classWriter, int memberType) |
|
197 |
throws Exception; |
|
198 |
||
199 |
/** |
|
200 |
* Return the specified member summary writer for a given annotation type. |
|
201 |
* |
|
202 |
* @param annotationTypeWriter the writer for the annotation type being |
|
203 |
* documented. |
|
204 |
* @param memberType the {@link VisibleMemberMap} member type indicating |
|
205 |
* the type of member summary that should be returned. |
|
206 |
* @return the summary writer for the give class. Return null if this |
|
207 |
* writer is not supported by the doclet. |
|
208 |
* |
|
209 |
* @see VisibleMemberMap |
|
210 |
* @throws IllegalArgumentException if memberType is unknown. |
|
211 |
*/ |
|
212 |
public abstract MemberSummaryWriter getMemberSummaryWriter( |
|
213 |
AnnotationTypeWriter annotationTypeWriter, int memberType) |
|
214 |
throws Exception; |
|
215 |
||
216 |
/** |
|
217 |
* Return the writer for the serialized form. |
|
218 |
* |
|
219 |
* @return the writer for the serialized form. |
|
220 |
*/ |
|
221 |
public SerializedFormWriter getSerializedFormWriter() throws Exception; |
|
222 |
} |