author | bpatel |
Wed, 27 Sep 2017 16:47:07 -0700 | |
changeset 47284 | 355349babaf4 |
parent 47216 | 71c04702a3d5 |
child 47299 | 56419ec66d4e |
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) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
102 |
StringBuilder sb = new StringBuilder(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
103 |
sb.append(utils.getFullyQualifiedName(member)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
104 |
if (!utils.isConstructor(member)) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
105 |
sb.append("."); |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
106 |
sb.append(member.getSimpleName()); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
107 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
108 |
sb.append(utils.flatSignature((ExecutableElement) member)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
109 |
|
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
110 |
return writer.getDocLink(MEMBER, member, sb); |
10 | 111 |
} |
112 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
113 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
114 |
* 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
|
115 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
116 |
* @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
|
117 |
* @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
|
118 |
* @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
|
119 |
* @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
|
120 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
121 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
122 |
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
|
123 |
Content tdSummary) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
124 |
ExecutableElement ee = (ExecutableElement)member; |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
125 |
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink, |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
126 |
writer.getDocLink(context, te, ee, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
127 |
name(ee), false)); |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
128 |
Content code = HtmlTree.CODE(memberLink); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
129 |
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
|
130 |
tdSummary.addContent(code); |
10 | 131 |
} |
132 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
133 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
134 |
* 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
|
135 |
* |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
136 |
* @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
|
137 |
* @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
|
138 |
* @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
|
139 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
140 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
141 |
protected void addInheritedSummaryLink(TypeElement te, Element member, Content linksTree) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
142 |
linksTree.addContent(writer.getDocLink(MEMBER, te, member, name(member), false)); |
10 | 143 |
} |
144 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
145 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
146 |
* 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
|
147 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
148 |
* @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
|
149 |
* @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
|
150 |
* @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
|
151 |
* @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
|
152 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
153 |
protected void addParam(ExecutableElement member, VariableElement param, |
17560 | 154 |
boolean isVarArg, Content tree) { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
155 |
Content link = writer.getLink(new LinkInfoImpl(configuration, EXECUTABLE_MEMBER_PARAM, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
156 |
param.asType()).varargs(isVarArg)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
157 |
tree.addContent(link); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
158 |
if(name(param).length() > 0) { |
40303 | 159 |
tree.addContent(Contents.SPACE); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
160 |
tree.addContent(name(param)); |
10 | 161 |
} |
162 |
} |
|
163 |
||
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
164 |
/** |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
165 |
* Add the receiver annotations information. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
166 |
* |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
167 |
* @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
|
168 |
* @param rcvrType the receiver type. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
169 |
* @param descList list of annotation description. |
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
170 |
* @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
|
171 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
172 |
protected void addReceiverAnnotations(ExecutableElement member, TypeMirror rcvrType, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
173 |
List<? extends AnnotationMirror> annotationMirrors, Content tree) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
174 |
writer.addReceiverAnnotationInfo(member, rcvrType, annotationMirrors, tree); |
40303 | 175 |
tree.addContent(Contents.SPACE); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
176 |
tree.addContent(utils.getTypeName(rcvrType, false)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
177 |
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
|
178 |
tree.addContent(writer.getTypeParameterLinks(linkInfo)); |
40303 | 179 |
tree.addContent(Contents.SPACE); |
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
180 |
tree.addContent("this"); |
15385 | 181 |
} |
182 |
||
183 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
184 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
185 |
* 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
|
186 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
187 |
* @param member the member to write parameters for. |
14259 | 188 |
* @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
|
189 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
190 |
protected void addParameters(ExecutableElement member, Content htmltree, int indentSize) { |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
191 |
addParameters(member, true, htmltree, indentSize); |
10 | 192 |
} |
193 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
194 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
195 |
* 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
|
196 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
197 |
* @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
|
198 |
* @param includeAnnotations true if annotation information needs to be added. |
14259 | 199 |
* @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
|
200 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
201 |
protected void addParameters(ExecutableElement member, |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
202 |
boolean includeAnnotations, Content htmltree, int indentSize) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
203 |
Content paramTree = new ContentBuilder(); |
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
204 |
String sep = ""; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
205 |
List<? extends VariableElement> parameters = member.getParameters(); |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
206 |
CharSequence indent = makeSpace(indentSize + 1); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
207 |
TypeMirror rcvrType = member.getReceiverType(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
208 |
if (includeAnnotations && rcvrType != null && utils.isAnnotated(rcvrType)) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
209 |
List<? extends AnnotationMirror> annotationMirrors = rcvrType.getAnnotationMirrors(); |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
210 |
addReceiverAnnotations(member, rcvrType, annotationMirrors, paramTree); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
211 |
sep = "," + DocletConstants.NL + indent; |
16964
096de5815398
8005091: javadoc should be able to return the receiver type
bpatel
parents:
15385
diff
changeset
|
212 |
} |
10 | 213 |
int paramstart; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
214 |
for (paramstart = 0; paramstart < parameters.size(); paramstart++) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
215 |
paramTree.addContent(sep); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
216 |
VariableElement param = parameters.get(paramstart); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
217 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
218 |
if (param.getKind() != ElementKind.INSTANCE_INIT) { |
10 | 219 |
if (includeAnnotations) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
220 |
boolean foundAnnotations = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
221 |
writer.addAnnotationInfo(indent.length(), |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
222 |
member, param, paramTree); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
223 |
if (foundAnnotations) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
224 |
paramTree.addContent(DocletConstants.NL); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
225 |
paramTree.addContent(indent); |
10 | 226 |
} |
227 |
} |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
228 |
addParam(member, param, |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
229 |
(paramstart == parameters.size() - 1) && member.isVarArgs(), paramTree); |
10 | 230 |
break; |
231 |
} |
|
232 |
} |
|
233 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
234 |
for (int i = paramstart + 1; i < parameters.size(); i++) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
235 |
paramTree.addContent(","); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
236 |
paramTree.addContent(DocletConstants.NL); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
237 |
paramTree.addContent(indent); |
10 | 238 |
if (includeAnnotations) { |
239 |
boolean foundAnnotations = |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
240 |
writer.addAnnotationInfo(indent.length(), member, parameters.get(i), |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
241 |
paramTree); |
10 | 242 |
if (foundAnnotations) { |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
243 |
paramTree.addContent(DocletConstants.NL); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
244 |
paramTree.addContent(indent); |
10 | 245 |
} |
246 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
247 |
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
|
248 |
paramTree); |
10 | 249 |
} |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
250 |
if (paramTree.isEmpty()) { |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
251 |
htmltree.addContent("()"); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
252 |
} else { |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
253 |
htmltree.addContent(Contents.ZERO_WIDTH_SPACE); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
254 |
htmltree.addContent("("); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
255 |
htmltree.addContent(paramTree); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
256 |
paramTree.addContent(")"); |
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
257 |
} |
10 | 258 |
} |
259 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
260 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
261 |
* Add exceptions for the executable member. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
262 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
263 |
* @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
|
264 |
* @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
|
265 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
266 |
protected void addExceptions(ExecutableElement member, Content htmltree, int indentSize) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
267 |
List<? extends TypeMirror> exceptions = member.getThrownTypes(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
268 |
if (!exceptions.isEmpty()) { |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
269 |
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
|
270 |
htmltree.addContent(DocletConstants.NL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
271 |
htmltree.addContent(indent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
272 |
htmltree.addContent("throws "); |
17564
c329fe11193d
8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
17561
diff
changeset
|
273 |
indent = makeSpace(indentSize + 1); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
274 |
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
|
275 |
htmltree.addContent(link); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
276 |
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
|
277 |
htmltree.addContent(","); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
278 |
htmltree.addContent(DocletConstants.NL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
279 |
htmltree.addContent(indent); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
280 |
Content exceptionLink = writer.getLink(new LinkInfoImpl(configuration, MEMBER, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
281 |
exceptions.get(i))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
282 |
htmltree.addContent(exceptionLink); |
10 | 283 |
} |
284 |
} |
|
285 |
} |
|
286 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
287 |
protected TypeElement implementsMethodInIntfac(ExecutableElement method, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
288 |
List<TypeElement> intfacs) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
289 |
for (TypeElement intf : intfacs) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
290 |
List<ExecutableElement> methods = utils.getMethods(intf); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
291 |
if (!methods.isEmpty()) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
292 |
for (ExecutableElement md : methods) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
293 |
if (name(md).equals(name(method)) && |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
294 |
md.toString().equals(method.toString())) { |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
21478
diff
changeset
|
295 |
return intf; |
10 | 296 |
} |
297 |
} |
|
298 |
} |
|
299 |
} |
|
300 |
return null; |
|
301 |
} |
|
302 |
||
303 |
/** |
|
304 |
* For backward compatibility, include an anchor using the erasures of the |
|
305 |
* parameters. NOTE: We won't need this method anymore after we fix |
|
306 |
* see tags so that they use the type instead of the erasure. |
|
307 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
308 |
* @param executableElement the ExecutableElement to anchor to. |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
309 |
* @return the 1.4.x style anchor for the executable element. |
10 | 310 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
311 |
protected String getErasureAnchor(ExecutableElement executableElement) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
312 |
final StringBuilder buf = new StringBuilder(name(executableElement) + "("); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
313 |
List<? extends VariableElement> parameters = executableElement.getParameters(); |
10 | 314 |
boolean foundTypeVariable = false; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
315 |
for (int i = 0; i < parameters.size(); i++) { |
10 | 316 |
if (i > 0) { |
317 |
buf.append(","); |
|
318 |
} |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
319 |
TypeMirror t = parameters.get(i).asType(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
320 |
SimpleTypeVisitor9<Boolean, Void> stv = new SimpleTypeVisitor9<Boolean, Void>() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
321 |
boolean foundTypeVariable = false; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
322 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
323 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
324 |
public Boolean visitArray(ArrayType t, Void p) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
325 |
visit(t.getComponentType()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
326 |
buf.append(utils.getDimension(t)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
327 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
328 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
329 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
330 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
331 |
public Boolean visitTypeVariable(TypeVariable t, Void p) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
332 |
buf.append(utils.asTypeElement(t).getQualifiedName()); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
333 |
foundTypeVariable = true; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
334 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
335 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
336 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
337 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
338 |
public Boolean visitDeclared(DeclaredType t, Void p) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
339 |
buf.append(utils.getQualifiedTypeName(t)); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
340 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
341 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
342 |
|
40606
eb2c81860c86
8164836: TEST_BUG: adjust scope of the DefinedByAnalyzer in tools/all/RunCodingRules.java
jlahoda
parents:
40508
diff
changeset
|
343 |
@Override |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
344 |
protected Boolean defaultAction(TypeMirror e, Void p) { |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
345 |
buf.append(e); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
346 |
return foundTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
347 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
348 |
}; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
349 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
350 |
boolean isTypeVariable = stv.visit(t); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
351 |
if (!foundTypeVariable) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
352 |
foundTypeVariable = isTypeVariable; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
31751
diff
changeset
|
353 |
} |
10 | 354 |
} |
355 |
buf.append(")"); |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
356 |
return foundTypeVariable ? writer.getName(buf.toString()) : null; |
10 | 357 |
} |
358 |
} |