author | jjg |
Tue, 10 Oct 2017 17:02:52 -0700 | |
changeset 47328 | d18df41954ba |
parent 47299 | 56419ec66d4e |
child 47850 | 4a28dc8a86c2 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
44297
e03f5fb3714b
8175200: Long method signatures disturb Method Summary table
bpatel
parents:
40606
diff
changeset
|
2 |
* Copyright (c) 1997, 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:
31751
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.formats.html; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
27 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
28 |
import java.util.List; |
10 | 29 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
30 |
import javax.lang.model.element.AnnotationMirror; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
31 |
import javax.lang.model.element.Element; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
32 |
import javax.lang.model.element.ElementKind; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
33 |
import javax.lang.model.element.ExecutableElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
34 |
import javax.lang.model.element.TypeElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
35 |
import javax.lang.model.element.VariableElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
36 |
import javax.lang.model.type.ArrayType; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
37 |
import javax.lang.model.type.DeclaredType; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
38 |
import javax.lang.model.type.TypeMirror; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
39 |
import javax.lang.model.type.TypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
40 |
import javax.lang.model.util.SimpleTypeVisitor9; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
41 |
|
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
42 |
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
43 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
44 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
45 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
46 |
import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
47 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
48 |
import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.*; |
10 | 49 |
|
50 |
/** |
|
51 |
* Print method and constructor info. |
|
52 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
53 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
54 |
* 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:
14259
diff
changeset
|
55 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
56 |
* deletion without notice.</b> |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
57 |
* |
10 | 58 |
* @author Robert Field |
59 |
* @author Atul M Dambalkar |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
60 |
* @author Bhavesh Patel (Modified) |
10 | 61 |
*/ |
62 |
public abstract class AbstractExecutableMemberWriter extends AbstractMemberWriter { |
|
63 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
64 |
public AbstractExecutableMemberWriter(SubWriterHolderWriter writer, TypeElement typeElement) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
65 |
super(writer, typeElement); |
10 | 66 |
} |
67 |
||
68 |
public AbstractExecutableMemberWriter(SubWriterHolderWriter writer) { |
|
69 |
super(writer); |
|
70 |
} |
|
71 |
||
72 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
73 |
* Add the type parameters for the executable member. |
10 | 74 |
* |
75 |
* @param member the member to write type parameters for. |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
76 |
* @param htmltree the content tree to which the parameters will be added. |
10 | 77 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
78 |
protected void addTypeParameters(ExecutableElement member, Content htmltree) { |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
79 |
Content typeParameters = getTypeParameters(member); |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
80 |
if (!typeParameters.isEmpty()) { |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
81 |
htmltree.addContent(typeParameters); |
40303 | 82 |
htmltree.addContent(Contents.SPACE); |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
83 |
} |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
84 |
} |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
85 |
|
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
86 |
/** |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
87 |
* Get the type parameters for the executable member. |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
88 |
* |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
89 |
* @param member the member for which to get the type parameters. |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
90 |
* @return the type parameters. |
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
91 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
92 |
protected Content getTypeParameters(ExecutableElement member) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
93 |
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, MEMBER_TYPE_PARAMS, member); |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
94 |
return writer.getTypeParameterLinks(linkInfo); |
10 | 95 |
} |
96 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
97 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
98 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
99 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
100 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
101 |
protected Content getDeprecatedLink(Element member) { |
47299 | 102 |
Content deprecatedLinkContent = new ContentBuilder(); |
103 |
deprecatedLinkContent.addContent(utils.getFullyQualifiedName(member)); |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
104 |
if (!utils.isConstructor(member)) { |
47299 | 105 |
deprecatedLinkContent.addContent("."); |
106 |
deprecatedLinkContent.addContent(member.getSimpleName()); |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
107 |
} |
47299 | 108 |
String signature = utils.flatSignature((ExecutableElement) member); |
109 |
if (signature.length() > 2) { |
|
110 |
deprecatedLinkContent.addContent(Contents.ZERO_WIDTH_SPACE); |
|
111 |
} |
|
112 |
deprecatedLinkContent.addContent(signature); |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
113 |
|
47299 | 114 |
return writer.getDocLink(MEMBER, utils.getEnclosingTypeElement(member), member, deprecatedLinkContent); |
10 | 115 |
} |
116 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
117 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
118 |
* Add the summary link for the member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
119 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
120 |
* @param context the id of the context where the link will be printed |
40508
74ef30d16fb9
8159305: Enhance the javadoc tool to support module related options
ksrini
parents:
40303
diff
changeset
|
121 |
* @param te the type element being linked to |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
122 |
* @param member the member being linked to |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
123 |
* @param tdSummary the content tree to which the link will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
124 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
125 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
126 |
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement te, Element member, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
127 |
Content tdSummary) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
128 |
ExecutableElement ee = (ExecutableElement)member; |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
129 |
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink, |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
130 |
writer.getDocLink(context, te, ee, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
131 |
name(ee), false)); |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
132 |
Content code = HtmlTree.CODE(memberLink); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
133 |
addParameters(ee, false, code, name(ee).length() - 1); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
134 |
tdSummary.addContent(code); |
10 | 135 |
} |
136 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
137 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
138 |
* Add the inherited summary link for the member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
139 |
* |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
140 |
* @param te the type element that we should link to |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
141 |
* @param member the member being linked to |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
142 |
* @param linksTree the content tree to which the link will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
143 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
144 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
145 |
protected void addInheritedSummaryLink(TypeElement te, Element member, Content linksTree) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
146 |
linksTree.addContent(writer.getDocLink(MEMBER, te, member, name(member), false)); |
10 | 147 |
} |
148 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
149 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
150 |
* Add the parameter for the executable member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
151 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
152 |
* @param member the member to write parameter for. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
153 |
* @param param the parameter that needs to be written. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
154 |
* @param isVarArg true if this is a link to var arg. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
155 |
* @param tree the content tree to which the parameter information will be added. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
156 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
157 |
protected void addParam(ExecutableElement member, VariableElement param, |
17560 | 158 |
boolean isVarArg, Content tree) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
159 |
Content link = writer.getLink(new LinkInfoImpl(configuration, EXECUTABLE_MEMBER_PARAM, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
160 |
param.asType()).varargs(isVarArg)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
161 |
tree.addContent(link); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
162 |
if(name(param).length() > 0) { |
40303 | 163 |
tree.addContent(Contents.SPACE); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
164 |
tree.addContent(name(param)); |
10 | 165 |
} |
166 |
} |
|
167 |
||
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
168 |
/** |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
169 |
* Add the receiver annotations information. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
170 |
* |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
171 |
* @param member the member to write receiver annotations for. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
172 |
* @param rcvrType the receiver type. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
173 |
* @param descList list of annotation description. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
174 |
* @param tree the content tree to which the information will be added. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
175 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
176 |
protected void addReceiverAnnotations(ExecutableElement member, TypeMirror rcvrType, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
177 |
List<? extends AnnotationMirror> annotationMirrors, Content tree) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
178 |
writer.addReceiverAnnotationInfo(member, rcvrType, annotationMirrors, tree); |
40303 | 179 |
tree.addContent(Contents.SPACE); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
180 |
tree.addContent(utils.getTypeName(rcvrType, false)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
181 |
LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, RECEIVER_TYPE, rcvrType); |
17559
87c28ee29329
8011642: Remove LinkOutput in favor of direct use of Content
jjg
parents:
17558
diff
changeset
|
182 |
tree.addContent(writer.getTypeParameterLinks(linkInfo)); |
40303 | 183 |
tree.addContent(Contents.SPACE); |
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
184 |
tree.addContent("this"); |
15385 | 185 |
} |
186 |
||
187 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
188 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
189 |
* Add all the parameters for the executable member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
190 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
191 |
* @param member the member to write parameters for. |
14259 | 192 |
* @param htmltree the content tree to which the parameters information will be added. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
193 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
194 |
protected void addParameters(ExecutableElement member, Content htmltree, int indentSize) { |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
195 |
addParameters(member, true, htmltree, indentSize); |
10 | 196 |
} |
197 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
198 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
199 |
* Add all the parameters for the executable member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
200 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
201 |
* @param member the member to write parameters for. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
202 |
* @param includeAnnotations true if annotation information needs to be added. |
14259 | 203 |
* @param htmltree the content tree to which the parameters information will be added. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
204 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
205 |
protected void addParameters(ExecutableElement member, |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
206 |
boolean includeAnnotations, Content htmltree, int indentSize) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
207 |
Content paramTree = new ContentBuilder(); |
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
208 |
String sep = ""; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
209 |
List<? extends VariableElement> parameters = member.getParameters(); |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
210 |
CharSequence indent = makeSpace(indentSize + 1); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
211 |
TypeMirror rcvrType = member.getReceiverType(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
212 |
if (includeAnnotations && rcvrType != null && utils.isAnnotated(rcvrType)) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
213 |
List<? extends AnnotationMirror> annotationMirrors = rcvrType.getAnnotationMirrors(); |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
214 |
addReceiverAnnotations(member, rcvrType, annotationMirrors, paramTree); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
215 |
sep = "," + DocletConstants.NL + indent; |
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
216 |
} |
10 | 217 |
int paramstart; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
218 |
for (paramstart = 0; paramstart < parameters.size(); paramstart++) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
219 |
paramTree.addContent(sep); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
220 |
VariableElement param = parameters.get(paramstart); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
221 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
222 |
if (param.getKind() != ElementKind.INSTANCE_INIT) { |
10 | 223 |
if (includeAnnotations) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
224 |
boolean foundAnnotations = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
225 |
writer.addAnnotationInfo(indent.length(), |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
226 |
member, param, paramTree); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
227 |
if (foundAnnotations) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
228 |
paramTree.addContent(DocletConstants.NL); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
229 |
paramTree.addContent(indent); |
10 | 230 |
} |
231 |
} |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
232 |
addParam(member, param, |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
233 |
(paramstart == parameters.size() - 1) && member.isVarArgs(), paramTree); |
10 | 234 |
break; |
235 |
} |
|
236 |
} |
|
237 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
238 |
for (int i = paramstart + 1; i < parameters.size(); i++) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
239 |
paramTree.addContent(","); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
240 |
paramTree.addContent(DocletConstants.NL); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
241 |
paramTree.addContent(indent); |
10 | 242 |
if (includeAnnotations) { |
243 |
boolean foundAnnotations = |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
244 |
writer.addAnnotationInfo(indent.length(), member, parameters.get(i), |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
245 |
paramTree); |
10 | 246 |
if (foundAnnotations) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
247 |
paramTree.addContent(DocletConstants.NL); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
248 |
paramTree.addContent(indent); |
10 | 249 |
} |
250 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
251 |
addParam(member, parameters.get(i), (i == parameters.size() - 1) && member.isVarArgs(), |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
252 |
paramTree); |
10 | 253 |
} |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
254 |
if (paramTree.isEmpty()) { |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
255 |
htmltree.addContent("()"); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
256 |
} else { |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
257 |
htmltree.addContent(Contents.ZERO_WIDTH_SPACE); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
258 |
htmltree.addContent("("); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
259 |
htmltree.addContent(paramTree); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
260 |
paramTree.addContent(")"); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
261 |
} |
10 | 262 |
} |
263 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
264 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
265 |
* Add exceptions for the executable member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
266 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
267 |
* @param member the member to write exceptions for. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
268 |
* @param htmltree the content tree to which the exceptions information will be added. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
269 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
270 |
protected void addExceptions(ExecutableElement member, Content htmltree, int indentSize) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
271 |
List<? extends TypeMirror> exceptions = member.getThrownTypes(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
272 |
if (!exceptions.isEmpty()) { |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
273 |
CharSequence indent = makeSpace(indentSize + 1 - 7); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
274 |
htmltree.addContent(DocletConstants.NL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
275 |
htmltree.addContent(indent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
276 |
htmltree.addContent("throws "); |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
277 |
indent = makeSpace(indentSize + 1); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
278 |
Content link = writer.getLink(new LinkInfoImpl(configuration, MEMBER, exceptions.get(0))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
279 |
htmltree.addContent(link); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
280 |
for(int i = 1; i < exceptions.size(); i++) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
281 |
htmltree.addContent(","); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
282 |
htmltree.addContent(DocletConstants.NL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
283 |
htmltree.addContent(indent); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
284 |
Content exceptionLink = writer.getLink(new LinkInfoImpl(configuration, MEMBER, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
285 |
exceptions.get(i))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
286 |
htmltree.addContent(exceptionLink); |
10 | 287 |
} |
288 |
} |
|
289 |
} |
|
290 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
291 |
protected TypeElement implementsMethodInIntfac(ExecutableElement method, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
292 |
List<TypeElement> intfacs) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
293 |
for (TypeElement intf : intfacs) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
294 |
List<ExecutableElement> methods = utils.getMethods(intf); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
295 |
if (!methods.isEmpty()) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
296 |
for (ExecutableElement md : methods) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
297 |
if (name(md).equals(name(method)) && |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
298 |
md.toString().equals(method.toString())) { |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
21478
diff
changeset
|
299 |
return intf; |
10 | 300 |
} |
301 |
} |
|
302 |
} |
|
303 |
} |
|
304 |
return null; |
|
305 |
} |
|
306 |
||
307 |
/** |
|
308 |
* For backward compatibility, include an anchor using the erasures of the |
|
309 |
* parameters. NOTE: We won't need this method anymore after we fix |
|
310 |
* see tags so that they use the type instead of the erasure. |
|
311 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
312 |
* @param executableElement the ExecutableElement to anchor to. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
313 |
* @return the 1.4.x style anchor for the executable element. |
10 | 314 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
315 |
protected String getErasureAnchor(ExecutableElement executableElement) { |
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47299
diff
changeset
|
316 |
final StringBuilder buf = new StringBuilder(writer.anchorName(executableElement)); |
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47299
diff
changeset
|
317 |
buf.append("("); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
318 |
List<? extends VariableElement> parameters = executableElement.getParameters(); |
10 | 319 |
boolean foundTypeVariable = false; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
320 |
for (int i = 0; i < parameters.size(); i++) { |
10 | 321 |
if (i > 0) { |
322 |
buf.append(","); |
|
323 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
324 |
TypeMirror t = parameters.get(i).asType(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
325 |
SimpleTypeVisitor9<Boolean, Void> stv = new SimpleTypeVisitor9<Boolean, Void>() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
326 |
boolean foundTypeVariable = false; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
327 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
328 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
329 |
public Boolean visitArray(ArrayType t, Void p) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
330 |
visit(t.getComponentType()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
331 |
buf.append(utils.getDimension(t)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
332 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
333 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
334 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
335 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
336 |
public Boolean visitTypeVariable(TypeVariable t, Void p) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
337 |
buf.append(utils.asTypeElement(t).getQualifiedName()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
338 |
foundTypeVariable = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
339 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
340 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
341 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
342 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
343 |
public Boolean visitDeclared(DeclaredType t, Void p) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
344 |
buf.append(utils.getQualifiedTypeName(t)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
345 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
346 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
347 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
348 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
349 |
protected Boolean defaultAction(TypeMirror e, Void p) { |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
350 |
buf.append(e); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
351 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
352 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
353 |
}; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
354 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
355 |
boolean isTypeVariable = stv.visit(t); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
356 |
if (!foundTypeVariable) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
357 |
foundTypeVariable = isTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
358 |
} |
10 | 359 |
} |
360 |
buf.append(")"); |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
361 |
return foundTypeVariable ? writer.getName(buf.toString()) : null; |
10 | 362 |
} |
363 |
} |