author | jjg |
Mon, 22 Aug 2016 16:32:40 -0700 | |
changeset 40587 | 1c355ea550ed |
parent 36526 | 3b41f1c69604 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
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 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.toolkit; |
10 | 27 |
|
36526 | 28 |
import javax.lang.model.element.ModuleElement; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
29 |
import javax.lang.model.element.PackageElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
30 |
import javax.lang.model.element.TypeElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
31 |
import javax.lang.model.type.TypeMirror; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
32 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
33 |
import jdk.javadoc.internal.doclets.toolkit.util.ClassTree; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
34 |
import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap; |
10 | 35 |
|
36 |
/** |
|
37 |
* The interface for a factory creates writers. |
|
38 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
39 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
40 |
* 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
|
41 |
* 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
|
42 |
* deletion without notice.</b> |
10 | 43 |
* |
44 |
* @author Jamie Ho |
|
45 |
*/ |
|
46 |
||
47 |
public interface WriterFactory { |
|
48 |
||
49 |
/** |
|
50 |
* Return the writer for the constant summary. |
|
51 |
* |
|
52 |
* @return the writer for the constant summary. Return null if this |
|
53 |
* writer is not supported by the doclet. |
|
54 |
*/ |
|
40587 | 55 |
public abstract ConstantsSummaryWriter getConstantsSummaryWriter(); |
10 | 56 |
|
57 |
/** |
|
58 |
* Return the writer for the package summary. |
|
59 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
60 |
* @param packageElement the package being documented. |
10 | 61 |
* @param prevPkg the previous package that was documented. |
62 |
* @param nextPkg the next package being documented. |
|
63 |
* @return the writer for the package summary. Return null if this |
|
64 |
* writer is not supported by the doclet. |
|
65 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
66 |
public abstract PackageSummaryWriter getPackageSummaryWriter(PackageElement |
40587 | 67 |
packageElement, PackageElement prevPkg, PackageElement nextPkg); |
10 | 68 |
|
69 |
/** |
|
36526 | 70 |
* Return the writer for the module summary. |
71 |
* |
|
72 |
* @param mdle the module being documented. |
|
73 |
* @param prevModule the previous module that was documented. |
|
74 |
* @param nextModule the next module being documented. |
|
75 |
* @return the writer for the module summary. Return null if this |
|
76 |
* writer is not supported by the doclet. |
|
77 |
*/ |
|
78 |
public abstract ModuleSummaryWriter getModuleSummaryWriter( |
|
40587 | 79 |
ModuleElement mdle, ModuleElement prevModule, ModuleElement nextModule); |
36526 | 80 |
|
81 |
/** |
|
10 | 82 |
* Return the writer for a class. |
83 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
84 |
* @param typeElement the class being documented. |
10 | 85 |
* @param prevClass the previous class that was documented. |
86 |
* @param nextClass the next class being documented. |
|
87 |
* @param classTree the class tree. |
|
88 |
* @return the writer for the class. Return null if this |
|
89 |
* writer is not supported by the doclet. |
|
90 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
25874
diff
changeset
|
91 |
public abstract ClassWriter getClassWriter(TypeElement typeElement, |
40587 | 92 |
TypeElement prevClass, TypeElement nextClass, ClassTree classTree); |
10 | 93 |
|
94 |
/** |
|
95 |
* Return the writer for an annotation type. |
|
96 |
* |
|
97 |
* @param annotationType the type being documented. |
|
98 |
* @param prevType the previous type that was documented. |
|
99 |
* @param nextType the next type being documented. |
|
100 |
* @return the writer for the annotation type. Return null if this |
|
101 |
* writer is not supported by the doclet. |
|
102 |
*/ |
|
103 |
public abstract AnnotationTypeWriter getAnnotationTypeWriter( |
|
40587 | 104 |
TypeElement annotationType, TypeMirror prevType, TypeMirror nextType); |
10 | 105 |
|
106 |
/** |
|
107 |
* Return the method writer for a given class. |
|
108 |
* |
|
109 |
* @param classWriter the writer for the class being documented. |
|
110 |
* @return the method writer for the give class. Return null if this |
|
111 |
* writer is not supported by the doclet. |
|
112 |
*/ |
|
40587 | 113 |
public abstract MethodWriter getMethodWriter(ClassWriter classWriter); |
10 | 114 |
|
115 |
/** |
|
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
116 |
* 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
|
117 |
* |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
118 |
* @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
|
119 |
* being documented. |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
120 |
* @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
|
121 |
* 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
|
122 |
*/ |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
123 |
public abstract AnnotationTypeFieldWriter |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
124 |
getAnnotationTypeFieldWriter( |
40587 | 125 |
AnnotationTypeWriter annotationTypeWriter); |
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
126 |
|
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
16319
diff
changeset
|
127 |
/** |
10 | 128 |
* Return the annotation type optional member writer for a given annotation |
129 |
* type. |
|
130 |
* |
|
131 |
* @param annotationTypeWriter the writer for the annotation type |
|
132 |
* being documented. |
|
133 |
* @return the member writer for the given annotation type. Return null if |
|
134 |
* this writer is not supported by the doclet. |
|
135 |
*/ |
|
136 |
public abstract AnnotationTypeOptionalMemberWriter |
|
137 |
getAnnotationTypeOptionalMemberWriter( |
|
40587 | 138 |
AnnotationTypeWriter annotationTypeWriter); |
10 | 139 |
|
140 |
/** |
|
141 |
* Return the annotation type required member writer for a given annotation type. |
|
142 |
* |
|
143 |
* @param annotationTypeWriter the writer for the annotation type |
|
144 |
* being documented. |
|
145 |
* @return the member writer for the given annotation type. Return null if |
|
146 |
* this writer is not supported by the doclet. |
|
147 |
*/ |
|
148 |
public abstract AnnotationTypeRequiredMemberWriter |
|
149 |
getAnnotationTypeRequiredMemberWriter( |
|
40587 | 150 |
AnnotationTypeWriter annotationTypeWriter); |
10 | 151 |
|
152 |
/** |
|
153 |
* Return the enum constant writer for a given class. |
|
154 |
* |
|
155 |
* @param classWriter the writer for the class being documented. |
|
156 |
* @return the enum constant writer for the give class. Return null if this |
|
157 |
* writer is not supported by the doclet. |
|
158 |
*/ |
|
159 |
public abstract EnumConstantWriter getEnumConstantWriter( |
|
40587 | 160 |
ClassWriter classWriter); |
10 | 161 |
|
162 |
/** |
|
163 |
* Return the field writer for a given class. |
|
164 |
* |
|
165 |
* @param classWriter the writer for the class being documented. |
|
166 |
* @return the field writer for the give class. Return null if this |
|
167 |
* writer is not supported by the doclet. |
|
168 |
*/ |
|
40587 | 169 |
public abstract FieldWriter getFieldWriter(ClassWriter classWriter); |
10 | 170 |
|
171 |
/** |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
172 |
* 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
|
173 |
* |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
174 |
* @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
|
175 |
* @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
|
176 |
* writer is not supported by the doclet. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
177 |
*/ |
40587 | 178 |
public abstract PropertyWriter getPropertyWriter(ClassWriter classWriter); |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
179 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
180 |
/** |
10 | 181 |
* Return the constructor writer for a given class. |
182 |
* |
|
183 |
* @param classWriter the writer for the class being documented. |
|
184 |
* @return the method writer for the give class. Return null if this |
|
185 |
* writer is not supported by the doclet. |
|
186 |
*/ |
|
187 |
public abstract ConstructorWriter getConstructorWriter( |
|
40587 | 188 |
ClassWriter classWriter); |
10 | 189 |
|
190 |
/** |
|
191 |
* Return the specified member summary writer for a given class. |
|
192 |
* |
|
193 |
* @param classWriter the writer for the class being documented. |
|
194 |
* @param memberType the {@link VisibleMemberMap} member type indicating |
|
195 |
* the type of member summary that should be returned. |
|
196 |
* @return the summary writer for the give class. Return null if this |
|
197 |
* writer is not supported by the doclet. |
|
198 |
* |
|
199 |
* @see VisibleMemberMap |
|
200 |
*/ |
|
201 |
public abstract MemberSummaryWriter getMemberSummaryWriter( |
|
40587 | 202 |
ClassWriter classWriter, VisibleMemberMap.Kind memberType); |
10 | 203 |
|
204 |
/** |
|
205 |
* Return the specified member summary writer for a given annotation type. |
|
206 |
* |
|
207 |
* @param annotationTypeWriter the writer for the annotation type being |
|
208 |
* documented. |
|
209 |
* @param memberType the {@link VisibleMemberMap} member type indicating |
|
210 |
* the type of member summary that should be returned. |
|
211 |
* @return the summary writer for the give class. Return null if this |
|
212 |
* writer is not supported by the doclet. |
|
213 |
* |
|
214 |
* @see VisibleMemberMap |
|
215 |
*/ |
|
216 |
public abstract MemberSummaryWriter getMemberSummaryWriter( |
|
40587 | 217 |
AnnotationTypeWriter annotationTypeWriter, VisibleMemberMap.Kind memberType); |
10 | 218 |
|
219 |
/** |
|
220 |
* Return the writer for the serialized form. |
|
221 |
* |
|
222 |
* @return the writer for the serialized form. |
|
223 |
*/ |
|
40587 | 224 |
public SerializedFormWriter getSerializedFormWriter(); |
10 | 225 |
} |