author | ksrini |
Mon, 05 Jun 2017 13:45:34 -0700 | |
changeset 45417 | f7479ee8de69 |
parent 41452 | ddaef4bba083 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
45417 | 2 |
* Copyright (c) 2003, 2017, 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:
33920
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.toolkit.taglets; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
27 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
28 |
import java.util.List; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
29 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
30 |
import javax.lang.model.element.Element; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
31 |
import javax.lang.model.element.VariableElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
32 |
import javax.lang.model.type.TypeMirror; |
10 | 33 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
34 |
import com.sun.source.doctree.DocTree; |
45417 | 35 |
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
36 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
37 |
import jdk.javadoc.internal.doclets.toolkit.taglets.Taglet.UnsupportedTagletOperationException; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
38 |
import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
39 |
import jdk.javadoc.internal.doclets.toolkit.util.Utils; |
10 | 40 |
|
41 |
/** |
|
42 |
* The interface for the taglet writer. |
|
43 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
44 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
45 |
* 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
|
46 |
* 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
|
47 |
* deletion without notice.</b> |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
48 |
* |
10 | 49 |
* @author Jamie Ho |
50 |
*/ |
|
51 |
||
52 |
public abstract class TagletWriter { |
|
53 |
||
54 |
/** |
|
55 |
* True if we only want to write the first sentence. |
|
56 |
*/ |
|
14542 | 57 |
protected final boolean isFirstSentence; |
58 |
||
59 |
protected TagletWriter(boolean isFirstSentence) { |
|
60 |
this.isFirstSentence = isFirstSentence; |
|
61 |
} |
|
10 | 62 |
|
63 |
/** |
|
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
64 |
* @return an instance of an output object. |
10 | 65 |
*/ |
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
66 |
public abstract Content getOutputInstance(); |
10 | 67 |
|
68 |
/** |
|
31751 | 69 |
* Return the output for a {@code {@code ...}} tag. |
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
70 |
* |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
71 |
* @param element |
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
72 |
* @param tag the tag. |
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
73 |
* @return the output of the taglet. |
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
74 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
75 |
protected abstract Content codeTagOutput(Element element, DocTree tag); |
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
76 |
|
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
77 |
/** |
33920 | 78 |
* Return the output for a {@index...} tag. |
79 |
* |
|
80 |
* @param tag the tag. |
|
81 |
* @return the output of the taglet. |
|
82 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
83 |
protected abstract Content indexTagOutput(Element element, DocTree tag); |
33920 | 84 |
|
85 |
/** |
|
10 | 86 |
* Returns the output for the DocRoot inline tag. |
87 |
* @return the output for the DocRoot inline tag. |
|
88 |
*/ |
|
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
89 |
protected abstract Content getDocRootOutput(); |
10 | 90 |
|
91 |
/** |
|
92 |
* Return the deprecated tag output. |
|
93 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
94 |
* @param element the element to write deprecated documentation for. |
10 | 95 |
* @return the output of the deprecated tag. |
96 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
97 |
protected abstract Content deprecatedTagOutput(Element element); |
10 | 98 |
|
99 |
/** |
|
31751 | 100 |
* Return the output for a {@code {@literal ...}} tag. |
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
101 |
* |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
102 |
* @param element |
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
103 |
* @param tag the tag. |
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
104 |
* @return the output of the taglet. |
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
105 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
106 |
protected abstract Content literalTagOutput(Element element, DocTree tag); |
17565
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
107 |
|
a705fe5e539f
8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents:
16319
diff
changeset
|
108 |
/** |
10 | 109 |
* Return the header for the param tags. |
110 |
* |
|
111 |
* @param header the header to display. |
|
112 |
* @return the header for the param tags. |
|
113 |
*/ |
|
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
114 |
protected abstract Content getParamHeader(String header); |
10 | 115 |
|
116 |
/** |
|
117 |
* Return the output for param tags. |
|
118 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
119 |
* @param element |
10 | 120 |
* @param paramTag the parameter to document. |
121 |
* @param paramName the name of the parameter. |
|
122 |
* @return the output of the param tag. |
|
123 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
124 |
protected abstract Content paramTagOutput(Element element, DocTree paramTag, String paramName); |
10 | 125 |
|
126 |
/** |
|
17572 | 127 |
* Return the output for property tags. |
128 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
129 |
* @param element |
17572 | 130 |
* @param propertyTag the parameter to document. |
131 |
* @param prefix the text with which to prefix the property name. |
|
132 |
* @return the output of the param tag. |
|
133 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
134 |
protected abstract Content propertyTagOutput(Element element, DocTree propertyTag, String prefix); |
17572 | 135 |
|
136 |
/** |
|
10 | 137 |
* Return the return tag output. |
138 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
139 |
* @param element |
10 | 140 |
* @param returnTag the return tag to output. |
141 |
* @return the output of the return tag. |
|
142 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
143 |
protected abstract Content returnTagOutput(Element element, DocTree returnTag); |
10 | 144 |
|
145 |
/** |
|
146 |
* Return the see tag output. |
|
147 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
148 |
* @param holder |
10 | 149 |
* @param seeTags the array of See tags. |
150 |
* @return the output of the see tags. |
|
151 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
152 |
protected abstract Content seeTagOutput(Element holder, List<? extends DocTree> seeTags); |
10 | 153 |
|
154 |
/** |
|
155 |
* Return the output for a simple tag. |
|
156 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
157 |
* @param element |
10 | 158 |
* @param simpleTags the array of simple tags. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
159 |
* @param header |
10 | 160 |
* @return the output of the simple tags. |
161 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
162 |
protected abstract Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header); |
10 | 163 |
|
164 |
/** |
|
165 |
* Return the output for a simple tag. |
|
166 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
167 |
* @param element |
10 | 168 |
* @param simpleTag the simple tag. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
169 |
* @param header |
10 | 170 |
* @return the output of the simple tag. |
171 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
172 |
protected abstract Content simpleTagOutput(Element element, DocTree simpleTag, String header); |
10 | 173 |
|
174 |
/** |
|
175 |
* Return the header for the throws tag. |
|
176 |
* |
|
177 |
* @return the header for the throws tag. |
|
178 |
*/ |
|
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
179 |
protected abstract Content getThrowsHeader(); |
10 | 180 |
|
181 |
/** |
|
182 |
* Return the header for the throws tag. |
|
183 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
184 |
* @param element |
10 | 185 |
* @param throwsTag the throws tag. |
186 |
* @return the output of the throws tag. |
|
187 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
188 |
protected abstract Content throwsTagOutput(Element element, DocTree throwsTag); |
10 | 189 |
|
190 |
/** |
|
191 |
* Return the output for the throws tag. |
|
192 |
* |
|
193 |
* @param throwsType the throws type. |
|
194 |
* @return the output of the throws type. |
|
195 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
196 |
protected abstract Content throwsTagOutput(TypeMirror throwsType); |
10 | 197 |
|
198 |
/** |
|
199 |
* Return the output for the value tag. |
|
200 |
* |
|
201 |
* @param field the constant field that holds the value tag. |
|
202 |
* @param constantVal the constant value to document. |
|
203 |
* @param includeLink true if we should link the constant text to the |
|
204 |
* constant field itself. |
|
205 |
* @return the output of the value tag. |
|
206 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
207 |
protected abstract Content valueTagOutput(VariableElement field, |
10 | 208 |
String constantVal, boolean includeLink); |
209 |
||
210 |
/** |
|
211 |
* Given an output object, append to it the tag documentation for |
|
212 |
* the given member. |
|
213 |
* |
|
214 |
* @param tagletManager the manager that manages the taglets. |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
215 |
* @param element the Doc that we are print tags for. |
10 | 216 |
* @param taglets the taglets to print. |
217 |
* @param writer the writer that will generate the output strings. |
|
218 |
* @param output the output buffer to store the output in. |
|
219 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
220 |
public static void genTagOutput(TagletManager tagletManager, Element element, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
221 |
List<Taglet> taglets, TagletWriter writer, Content output) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
222 |
Utils utils = writer.configuration().utils; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
223 |
tagletManager.checkTags(utils, element, utils.getBlockTags(element), false); |
41452 | 224 |
tagletManager.checkTags(utils, element, utils.getFullBody(element), true); |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
225 |
for (Taglet taglet : taglets) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
226 |
if (utils.isTypeElement(element) && taglet instanceof ParamTaglet) { |
10 | 227 |
//The type parameters are documented in a special section away |
228 |
//from the tag info, so skip here. |
|
229 |
continue; |
|
230 |
} |
|
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
231 |
if (taglet instanceof DeprecatedTaglet) { |
10 | 232 |
//Deprecated information is documented "inline", not in tag info |
233 |
//section. |
|
234 |
continue; |
|
235 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
236 |
Content currentOutput = null; |
10 | 237 |
try { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
238 |
currentOutput = taglet.getTagletOutput(element, writer); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
239 |
} catch (UnsupportedTagletOperationException utoe) { |
10 | 240 |
//The taglet does not take a member as an argument. Let's try |
241 |
//a single tag. |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
242 |
List<? extends DocTree> tags = utils.getBlockTags(element, taglet.getName()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
243 |
if (!tags.isEmpty()) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
244 |
currentOutput = taglet.getTagletOutput(element, tags.get(0), writer); |
10 | 245 |
} |
246 |
} |
|
247 |
if (currentOutput != null) { |
|
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
248 |
tagletManager.seenCustomTag(taglet.getName()); |
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
249 |
output.addContent(currentOutput); |
10 | 250 |
} |
251 |
} |
|
252 |
} |
|
253 |
/** |
|
254 |
* Given an inline tag, return its output. |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
255 |
* @param holder |
10 | 256 |
* @param tagletManager The taglet manager for the current doclet. |
257 |
* @param holderTag The tag this holds this inline tag. Null if there |
|
258 |
* is no tag that holds it. |
|
259 |
* @param inlineTag The inline tag to be documented. |
|
260 |
* @param tagletWriter The taglet writer to write the output. |
|
261 |
* @return The output of the inline tag. |
|
262 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
263 |
public static Content getInlineTagOutput(Element holder, TagletManager tagletManager, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
264 |
DocTree holderTag, DocTree inlineTag, TagletWriter tagletWriter) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
265 |
List<Taglet> definedTags = tagletManager.getInlineCustomTaglets(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
266 |
CommentHelper ch = tagletWriter.configuration().utils.getCommentHelper(holder); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
267 |
final String inlineTagName = ch.getTagName(inlineTag); |
10 | 268 |
//This is a custom inline tag. |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
269 |
for (Taglet definedTag : definedTags) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
270 |
if ((definedTag.getName()).equals(inlineTagName)) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
271 |
// Given a name of a seen custom tag, remove it from the |
10 | 272 |
// set of unseen custom tags. |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
273 |
tagletManager.seenCustomTag(definedTag.getName()); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
274 |
Content output = definedTag.getTagletOutput(holder, |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
275 |
holderTag != null && |
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
276 |
definedTag.getName().equals("inheritDoc") ? |
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
17574
diff
changeset
|
277 |
holderTag : inlineTag, tagletWriter); |
10 | 278 |
return output; |
279 |
} |
|
280 |
} |
|
281 |
return null; |
|
282 |
} |
|
283 |
||
284 |
/** |
|
285 |
* Converts inline tags and text to TagOutput, expanding the |
|
286 |
* inline tags along the way. Called wherever text can contain |
|
287 |
* an inline tag, such as in comments or in free-form text arguments |
|
288 |
* to non-inline tags. |
|
289 |
* |
|
290 |
* @param holderTag the tag that holds the documentation. |
|
291 |
* @param tags array of text tags and inline tags (often alternating) |
|
292 |
* present in the text of interest for this doc. |
|
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
293 |
* @return the {@link Content} representing the comments. |
10 | 294 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
295 |
public abstract Content commentTagsToOutput(DocTree holderTag, List<? extends DocTree> tags); |
10 | 296 |
|
297 |
/** |
|
298 |
* Converts inline tags and text to TagOutput, expanding the |
|
299 |
* inline tags along the way. Called wherever text can contain |
|
300 |
* an inline tag, such as in comments or in free-form text arguments |
|
301 |
* to non-inline tags. |
|
302 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
303 |
* @param holder the element where comment resides. |
10 | 304 |
* @param tags array of text tags and inline tags (often alternating) |
305 |
* present in the text of interest for this doc. |
|
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
306 |
* @return the {@link Content} representing the comments. |
10 | 307 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
308 |
public abstract Content commentTagsToOutput(Element holder, List<? extends DocTree> tags); |
10 | 309 |
|
310 |
/** |
|
311 |
* Converts inline tags and text to TagOutput, expanding the |
|
312 |
* inline tags along the way. Called wherever text can contain |
|
313 |
* an inline tag, such as in comments or in free-form text arguments |
|
314 |
* to non-inline tags. |
|
315 |
* |
|
316 |
* @param holderTag the tag that holds the documentation. |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
317 |
* @param holder the element where comment resides. |
10 | 318 |
* @param tags array of text tags and inline tags (often alternating) |
319 |
* present in the text of interest for this doc. |
|
320 |
* @param isFirstSentence true if this is the first sentence. |
|
17574
044c7e1e4d53
8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents:
17573
diff
changeset
|
321 |
* @return the {@link Content} representing the comments. |
10 | 322 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
323 |
public abstract Content commentTagsToOutput(DocTree holderTag, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
33920
diff
changeset
|
324 |
Element holder, List<? extends DocTree> tags, boolean isFirstSentence); |
10 | 325 |
|
326 |
/** |
|
327 |
* @return an instance of the configuration used for this doclet. |
|
328 |
*/ |
|
45417 | 329 |
public abstract BaseConfiguration configuration(); |
10 | 330 |
} |