author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 45417 | langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java@f7479ee8de69 |
child 47395 | 2ea4edfdef8e |
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:
34752
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.formats.html; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
27 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
28 |
import javax.lang.model.element.ExecutableElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
29 |
import javax.lang.model.element.TypeElement; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
30 |
import javax.lang.model.type.TypeMirror; |
10 | 31 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
32 |
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
33 |
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
34 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
35 |
import jdk.javadoc.internal.doclets.toolkit.util.Utils; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
36 |
import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
37 |
|
10 | 38 |
|
14260 | 39 |
/** |
40 |
* <p><b>This is NOT part of any supported API. |
|
41 |
* If you write code that depends on this, you do so at your own risk. |
|
42 |
* This code and its internal interfaces are subject to change or |
|
43 |
* deletion without notice.</b> |
|
44 |
*/ |
|
10 | 45 |
public class LinkInfoImpl extends LinkInfo { |
46 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
47 |
public enum Kind { |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
48 |
DEFAULT, |
10 | 49 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
50 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
51 |
* Indicate that the link appears in a class list. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
52 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
53 |
ALL_CLASSES_FRAME, |
10 | 54 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
55 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
56 |
* Indicate that the link appears in a class documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
57 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
58 |
CLASS, |
10 | 59 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
60 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
61 |
* Indicate that the link appears in member documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
62 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
63 |
MEMBER, |
10 | 64 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
65 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
66 |
* Indicate that the link appears in class use documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
67 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
68 |
CLASS_USE, |
10 | 69 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
70 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
71 |
* Indicate that the link appears in index documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
72 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
73 |
INDEX, |
10 | 74 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
75 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
76 |
* Indicate that the link appears in constant value summary. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
77 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
78 |
CONSTANT_SUMMARY, |
10 | 79 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
80 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
81 |
* Indicate that the link appears in serialized form documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
82 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
83 |
SERIALIZED_FORM, |
10 | 84 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
85 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
86 |
* Indicate that the link appears in serial member documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
87 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
88 |
SERIAL_MEMBER, |
10 | 89 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
90 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
91 |
* Indicate that the link appears in package documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
92 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
93 |
PACKAGE, |
10 | 94 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
95 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
96 |
* Indicate that the link appears in see tag documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
97 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
98 |
SEE_TAG, |
10 | 99 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
100 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
101 |
* Indicate that the link appears in value tag documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
102 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
103 |
VALUE_TAG, |
10 | 104 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
105 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
106 |
* Indicate that the link appears in tree documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
107 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
108 |
TREE, |
10 | 109 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
110 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
111 |
* Indicate that the link appears in a class list. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
112 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
113 |
PACKAGE_FRAME, |
10 | 114 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
115 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
116 |
* The header in the class documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
117 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
118 |
CLASS_HEADER, |
10 | 119 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
120 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
121 |
* The signature in the class documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
122 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
123 |
CLASS_SIGNATURE, |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
124 |
|
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
125 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
126 |
* The return type of a method. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
127 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
128 |
RETURN_TYPE, |
10 | 129 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
130 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
131 |
* The return type of a method in a member summary. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
132 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
133 |
SUMMARY_RETURN_TYPE, |
10 | 134 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
135 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
136 |
* The type of a method/constructor parameter. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
137 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
138 |
EXECUTABLE_MEMBER_PARAM, |
10 | 139 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
140 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
141 |
* Super interface links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
142 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
143 |
SUPER_INTERFACES, |
10 | 144 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
145 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
146 |
* Implemented interface links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
147 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
148 |
IMPLEMENTED_INTERFACES, |
10 | 149 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
150 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
151 |
* Implemented class links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
152 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
153 |
IMPLEMENTED_CLASSES, |
10 | 154 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
155 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
156 |
* Subinterface links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
157 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
158 |
SUBINTERFACES, |
10 | 159 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
160 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
161 |
* Subclasses links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
162 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
163 |
SUBCLASSES, |
10 | 164 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
165 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
166 |
* The signature in the class documentation (implements/extends portion). |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
167 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
168 |
CLASS_SIGNATURE_PARENT_NAME, |
10 | 169 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
170 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
171 |
* The header for method documentation copied from parent. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
172 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
173 |
EXECUTABLE_ELEMENT_COPY, |
10 | 174 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
175 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
176 |
* Method "specified by" link. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
177 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
178 |
METHOD_SPECIFIED_BY, |
10 | 179 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
180 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
181 |
* Method "overrides" link. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
182 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
183 |
METHOD_OVERRIDES, |
10 | 184 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
185 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
186 |
* Annotation link. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
187 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
188 |
ANNOTATION, |
10 | 189 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
190 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
191 |
* The header for field documentation copied from parent. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
192 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
193 |
VARIABLE_ELEMENT_COPY, |
10 | 194 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
195 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
196 |
* The parent nodes in the class tree. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
197 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
198 |
CLASS_TREE_PARENT, |
10 | 199 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
200 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
201 |
* The type parameters of a method or constructor. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
202 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
203 |
MEMBER_TYPE_PARAMS, |
10 | 204 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
205 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
206 |
* Indicate that the link appears in class use documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
207 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
208 |
CLASS_USE_HEADER, |
10 | 209 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
210 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
211 |
* The header for property documentation copied from parent. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
212 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
213 |
PROPERTY_COPY, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
214 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
215 |
/** |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
216 |
* A receiver type |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
217 |
*/ |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
218 |
RECEIVER_TYPE |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
219 |
} |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15385
diff
changeset
|
220 |
|
45417 | 221 |
public final HtmlConfiguration configuration; |
14542 | 222 |
|
10 | 223 |
/** |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
224 |
* The location of the link. |
10 | 225 |
*/ |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
226 |
public Kind context = Kind.DEFAULT; |
10 | 227 |
|
228 |
/** |
|
229 |
* The value of the marker #. |
|
230 |
*/ |
|
231 |
public String where = ""; |
|
232 |
||
233 |
/** |
|
234 |
* String style of text defined in style sheet. |
|
235 |
*/ |
|
17560 | 236 |
public String styleName = ""; |
10 | 237 |
|
238 |
/** |
|
14542 | 239 |
* The value of the target. |
10 | 240 |
*/ |
241 |
public String target = ""; |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
242 |
public final Utils utils; |
10 | 243 |
/** |
244 |
* Construct a LinkInfo object. |
|
245 |
* |
|
14542 | 246 |
* @param configuration the configuration data for the doclet |
10 | 247 |
* @param context the context of the link. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
248 |
* @param ee the member to link to. |
10 | 249 |
*/ |
45417 | 250 |
public LinkInfoImpl(HtmlConfiguration configuration, Kind context, ExecutableElement ee) { |
14542 | 251 |
this.configuration = configuration; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
252 |
this.utils = configuration.utils; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
253 |
this.executableElement = ee; |
10 | 254 |
setContext(context); |
255 |
} |
|
256 |
||
257 |
/** |
|
31751 | 258 |
* {@inheritDoc} |
17560 | 259 |
*/ |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
260 |
@Override |
17560 | 261 |
protected Content newContent() { |
262 |
return new ContentBuilder(); |
|
263 |
} |
|
264 |
||
265 |
/** |
|
10 | 266 |
* Construct a LinkInfo object. |
267 |
* |
|
14542 | 268 |
* @param configuration the configuration data for the doclet |
10 | 269 |
* @param context the context of the link. |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
270 |
* @param typeElement the class to link to. |
17560 | 271 |
*/ |
45417 | 272 |
public LinkInfoImpl(HtmlConfiguration configuration, Kind context, TypeElement typeElement) { |
14542 | 273 |
this.configuration = configuration; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
274 |
this.utils = configuration.utils; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
275 |
this.typeElement = typeElement; |
10 | 276 |
setContext(context); |
277 |
} |
|
278 |
||
279 |
/** |
|
280 |
* Construct a LinkInfo object. |
|
281 |
* |
|
14542 | 282 |
* @param configuration the configuration data for the doclet |
10 | 283 |
* @param context the context of the link. |
284 |
* @param type the class to link to. |
|
285 |
*/ |
|
45417 | 286 |
public LinkInfoImpl(HtmlConfiguration configuration, Kind context, TypeMirror type) { |
14542 | 287 |
this.configuration = configuration; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
288 |
this.utils = configuration.utils; |
10 | 289 |
this.type = type; |
290 |
setContext(context); |
|
291 |
} |
|
292 |
||
293 |
/** |
|
17561 | 294 |
* Set the label for the link. |
295 |
* @param label plain-text label for the link |
|
10 | 296 |
*/ |
36500
d31e4986dc8b
8149139: [javadoc] Modify Content to accept CharSequence
ksrini
parents:
35426
diff
changeset
|
297 |
public LinkInfoImpl label(CharSequence label) { |
17561 | 298 |
this.label = new StringContent(label); |
299 |
return this; |
|
10 | 300 |
} |
301 |
||
302 |
/** |
|
17561 | 303 |
* Set the label for the link. |
17560 | 304 |
*/ |
17561 | 305 |
public LinkInfoImpl label(Content label) { |
306 |
this.label = label; |
|
307 |
return this; |
|
308 |
} |
|
309 |
||
310 |
/** |
|
311 |
* Set whether or not the link should be strong. |
|
312 |
*/ |
|
313 |
public LinkInfoImpl strong(boolean strong) { |
|
314 |
this.isStrong = strong; |
|
315 |
return this; |
|
17560 | 316 |
} |
317 |
||
318 |
/** |
|
17561 | 319 |
* Set the style to be used for the link. |
320 |
* @param styleName String style of text defined in style sheet. |
|
10 | 321 |
*/ |
17561 | 322 |
public LinkInfoImpl styleName(String styleName) { |
323 |
this.styleName = styleName; |
|
324 |
return this; |
|
10 | 325 |
} |
326 |
||
327 |
/** |
|
17561 | 328 |
* Set the target to be used for the link. |
329 |
* @param styleName String style of text defined in style sheet. |
|
17560 | 330 |
*/ |
17561 | 331 |
public LinkInfoImpl target(String target) { |
332 |
this.target = target; |
|
333 |
return this; |
|
17560 | 334 |
} |
335 |
||
336 |
/** |
|
17561 | 337 |
* Set whether or not this is a link to a varargs parameter. |
10 | 338 |
*/ |
17561 | 339 |
public LinkInfoImpl varargs(boolean varargs) { |
340 |
this.isVarArg = varargs; |
|
341 |
return this; |
|
10 | 342 |
} |
343 |
||
344 |
/** |
|
17561 | 345 |
* Set the fragment specifier for the link. |
346 |
*/ |
|
347 |
public LinkInfoImpl where(String where) { |
|
348 |
this.where = where; |
|
349 |
return this; |
|
350 |
} |
|
351 |
||
352 |
/** |
|
10 | 353 |
* {@inheritDoc} |
354 |
*/ |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
355 |
public Kind getContext() { |
10 | 356 |
return context; |
357 |
} |
|
358 |
||
359 |
/** |
|
360 |
* {@inheritDoc} |
|
361 |
* |
|
362 |
* This method sets the link attributes to the appropriate values |
|
363 |
* based on the context. |
|
364 |
* |
|
365 |
* @param c the context id to set. |
|
366 |
*/ |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
367 |
public final void setContext(Kind c) { |
10 | 368 |
//NOTE: Put context specific link code here. |
369 |
switch (c) { |
|
370 |
case ALL_CLASSES_FRAME: |
|
371 |
case PACKAGE_FRAME: |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
372 |
case IMPLEMENTED_CLASSES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
373 |
case SUBCLASSES: |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
374 |
case EXECUTABLE_ELEMENT_COPY: |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
375 |
case VARIABLE_ELEMENT_COPY: |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
376 |
case PROPERTY_COPY: |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
377 |
case CLASS_USE_HEADER: |
10 | 378 |
includeTypeInClassLinkLabel = false; |
379 |
break; |
|
380 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
381 |
case ANNOTATION: |
10 | 382 |
excludeTypeParameterLinks = true; |
383 |
excludeTypeBounds = true; |
|
384 |
break; |
|
385 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
386 |
case IMPLEMENTED_INTERFACES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
387 |
case SUPER_INTERFACES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
388 |
case SUBINTERFACES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
389 |
case CLASS_TREE_PARENT: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
390 |
case TREE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
391 |
case CLASS_SIGNATURE_PARENT_NAME: |
10 | 392 |
excludeTypeParameterLinks = true; |
393 |
excludeTypeBounds = true; |
|
394 |
includeTypeInClassLinkLabel = false; |
|
395 |
includeTypeAsSepLink = true; |
|
396 |
break; |
|
397 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
398 |
case PACKAGE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
399 |
case CLASS_USE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
400 |
case CLASS_HEADER: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
401 |
case CLASS_SIGNATURE: |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
402 |
case RECEIVER_TYPE: |
10 | 403 |
excludeTypeParameterLinks = true; |
404 |
includeTypeAsSepLink = true; |
|
405 |
includeTypeInClassLinkLabel = false; |
|
406 |
break; |
|
407 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
408 |
case MEMBER_TYPE_PARAMS: |
10 | 409 |
includeTypeAsSepLink = true; |
410 |
includeTypeInClassLinkLabel = false; |
|
411 |
break; |
|
412 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
413 |
case RETURN_TYPE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
414 |
case SUMMARY_RETURN_TYPE: |
15385 | 415 |
excludeTypeBounds = true; |
416 |
break; |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
417 |
case EXECUTABLE_MEMBER_PARAM: |
10 | 418 |
excludeTypeBounds = true; |
419 |
break; |
|
420 |
} |
|
421 |
context = c; |
|
422 |
if (type != null && |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
423 |
utils.isTypeVariable(type) && |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
424 |
utils.isExecutableElement(utils.asTypeElement(type).getEnclosingElement())) { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
425 |
excludeTypeParameterLinks = true; |
10 | 426 |
} |
427 |
} |
|
428 |
||
429 |
/** |
|
430 |
* Return true if this link is linkable and false if we can't link to the |
|
431 |
* desired place. |
|
432 |
* |
|
433 |
* @return true if this link is linkable and false if we can't link to the |
|
434 |
* desired place. |
|
435 |
*/ |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
436 |
@Override |
10 | 437 |
public boolean isLinkable() { |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
438 |
return configuration.utils.isLinkable(typeElement); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
439 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
440 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
441 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
442 |
public String toString() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
443 |
return "LinkInfoImpl{" + |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
444 |
"context=" + context + |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
445 |
", where=" + where + |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
446 |
", styleName=" + styleName + |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
447 |
", target=" + target + |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34752
diff
changeset
|
448 |
super.toString() + '}'; |
10 | 449 |
} |
450 |
} |