author | jjg |
Tue, 14 May 2013 10:14:52 -0700 | |
changeset 17560 | 9f6771abbd1a |
parent 17558 | eee4ccf66cfd |
child 17561 | 9f3505f35da9 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
15385 | 2 |
* Copyright (c) 2003, 2013, 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 |
||
26 |
||
27 |
package com.sun.tools.doclets.formats.html; |
|
28 |
||
29 |
import com.sun.javadoc.*; |
|
17560 | 30 |
import com.sun.tools.doclets.formats.html.markup.ContentBuilder; |
31 |
import com.sun.tools.doclets.formats.html.markup.StringContent; |
|
32 |
import com.sun.tools.doclets.internal.toolkit.Content; |
|
10 | 33 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
34 |
import com.sun.tools.doclets.internal.toolkit.util.links.*; |
|
35 |
||
14260 | 36 |
/** |
37 |
* <p><b>This is NOT part of any supported API. |
|
38 |
* If you write code that depends on this, you do so at your own risk. |
|
39 |
* This code and its internal interfaces are subject to change or |
|
40 |
* deletion without notice.</b> |
|
41 |
*/ |
|
10 | 42 |
public class LinkInfoImpl extends LinkInfo { |
43 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
44 |
public enum Kind { |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
45 |
DEFAULT, |
10 | 46 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
47 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
48 |
* Indicate that the link appears in a class list. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
49 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
50 |
ALL_CLASSES_FRAME, |
10 | 51 |
|
17558
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 |
* Indicate that the link appears in a class documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
54 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
55 |
CLASS, |
10 | 56 |
|
17558
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 |
* Indicate that the link appears in member documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
59 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
60 |
MEMBER, |
10 | 61 |
|
17558
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 |
* Indicate that the link appears in class use documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
64 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
65 |
CLASS_USE, |
10 | 66 |
|
17558
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 |
* Indicate that the link appears in index documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
69 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
70 |
INDEX, |
10 | 71 |
|
17558
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 |
* Indicate that the link appears in constant value summary. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
74 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
75 |
CONSTANT_SUMMARY, |
10 | 76 |
|
17558
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 |
* Indicate that the link appears in serialized form documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
79 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
80 |
SERIALIZED_FORM, |
10 | 81 |
|
17558
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 |
* Indicate that the link appears in serial member documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
84 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
85 |
SERIAL_MEMBER, |
10 | 86 |
|
17558
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 |
* Indicate that the link appears in package documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
89 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
90 |
PACKAGE, |
10 | 91 |
|
17558
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 |
* Indicate that the link appears in see tag documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
94 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
95 |
SEE_TAG, |
10 | 96 |
|
17558
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 |
* Indicate that the link appears in value tag documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
99 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
100 |
VALUE_TAG, |
10 | 101 |
|
17558
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 |
* Indicate that the link appears in tree documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
104 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
105 |
TREE, |
10 | 106 |
|
17558
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 |
* Indicate that the link appears in a class list. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
109 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
110 |
PACKAGE_FRAME, |
10 | 111 |
|
17558
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 |
* The header in the class documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
114 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
115 |
CLASS_HEADER, |
10 | 116 |
|
17558
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 |
* The signature in the class documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
119 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
120 |
CLASS_SIGNATURE, |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
121 |
|
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 |
* The return type of a method. |
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 |
RETURN_TYPE, |
10 | 126 |
|
17558
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 |
* The return type of a method in a member summary. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
129 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
130 |
SUMMARY_RETURN_TYPE, |
10 | 131 |
|
17558
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 |
* The type of a method/constructor parameter. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
134 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
135 |
EXECUTABLE_MEMBER_PARAM, |
10 | 136 |
|
17558
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 |
* Super interface links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
139 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
140 |
SUPER_INTERFACES, |
10 | 141 |
|
17558
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 |
* Implemented interface links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
144 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
145 |
IMPLEMENTED_INTERFACES, |
10 | 146 |
|
17558
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 class links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
149 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
150 |
IMPLEMENTED_CLASSES, |
10 | 151 |
|
17558
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 |
* Subinterface links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
154 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
155 |
SUBINTERFACES, |
10 | 156 |
|
17558
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 |
* Subclasses links. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
159 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
160 |
SUBCLASSES, |
10 | 161 |
|
17558
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 |
* The signature in the class documentation (implements/extends portion). |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
164 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
165 |
CLASS_SIGNATURE_PARENT_NAME, |
10 | 166 |
|
17558
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 |
* The header for method documentation copied from parent. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
169 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
170 |
METHOD_DOC_COPY, |
10 | 171 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
172 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
173 |
* Method "specified by" link. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
174 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
175 |
METHOD_SPECIFIED_BY, |
10 | 176 |
|
17558
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 "overrides" link. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
179 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
180 |
METHOD_OVERRIDES, |
10 | 181 |
|
17558
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 |
* Annotation link. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
184 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
185 |
ANNOTATION, |
10 | 186 |
|
17558
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 |
* The header for field documentation copied from parent. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
189 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
190 |
FIELD_DOC_COPY, |
10 | 191 |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
192 |
/** |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
193 |
* The parent nodes in the class tree. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
194 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
195 |
CLASS_TREE_PARENT, |
10 | 196 |
|
17558
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 |
* The type parameters of a method or constructor. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
199 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
200 |
MEMBER_TYPE_PARAMS, |
10 | 201 |
|
17558
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 |
* Indicate that the link appears in class use documentation. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
204 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
205 |
CLASS_USE_HEADER, |
10 | 206 |
|
17558
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 |
* The header for property documentation copied from parent. |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
209 |
*/ |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
210 |
PROPERTY_DOC_COPY |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
211 |
} |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15385
diff
changeset
|
212 |
|
14542 | 213 |
public final ConfigurationImpl configuration; |
214 |
||
10 | 215 |
/** |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
216 |
* The location of the link. |
10 | 217 |
*/ |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
218 |
public Kind context = Kind.DEFAULT; |
10 | 219 |
|
220 |
/** |
|
221 |
* The value of the marker #. |
|
222 |
*/ |
|
223 |
public String where = ""; |
|
224 |
||
225 |
/** |
|
226 |
* String style of text defined in style sheet. |
|
227 |
*/ |
|
17560 | 228 |
public String styleName = ""; |
10 | 229 |
|
230 |
/** |
|
14542 | 231 |
* The value of the target. |
10 | 232 |
*/ |
233 |
public String target = ""; |
|
234 |
||
235 |
/** |
|
236 |
* Construct a LinkInfo object. |
|
237 |
* |
|
14542 | 238 |
* @param configuration the configuration data for the doclet |
10 | 239 |
* @param context the context of the link. |
240 |
* @param classDoc the class to link to. |
|
241 |
* @param label the label for the link. |
|
242 |
* @param target the value of the target attribute. |
|
243 |
*/ |
|
14542 | 244 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17560 | 245 |
Kind context, ClassDoc classDoc, Content label, String target) { |
14542 | 246 |
this.configuration = configuration; |
10 | 247 |
this.classDoc = classDoc; |
248 |
this.label = label; |
|
249 |
this.target = target; |
|
250 |
setContext(context); |
|
251 |
} |
|
252 |
||
253 |
/** |
|
17560 | 254 |
* {@inherotDoc} |
255 |
*/ |
|
256 |
protected Content newContent() { |
|
257 |
return new ContentBuilder(); |
|
258 |
} |
|
259 |
||
260 |
/** |
|
10 | 261 |
* Construct a LinkInfo object. |
262 |
* |
|
14542 | 263 |
* @param configuration the configuration data for the doclet |
10 | 264 |
* @param context the context of the link. |
265 |
* @param classDoc the class to link to. |
|
266 |
* @param where the value of the marker #. |
|
267 |
* @param label the label for the link. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
268 |
* @param isStrong true if the link should be strong. |
10 | 269 |
* @param styleName String style of text defined in style sheet. |
270 |
*/ |
|
14542 | 271 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17560 | 272 |
Kind context, ClassDoc classDoc, String where, Content label, |
14542 | 273 |
boolean isStrong, String styleName) { |
274 |
this.configuration = configuration; |
|
10 | 275 |
this.classDoc = classDoc; |
276 |
this.where = where; |
|
277 |
this.label = label; |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
278 |
this.isStrong = isStrong; |
10 | 279 |
this.styleName = styleName; |
280 |
setContext(context); |
|
281 |
} |
|
282 |
||
283 |
/** |
|
284 |
* Construct a LinkInfo object. |
|
285 |
* |
|
14542 | 286 |
* @param configuration the configuration data for the doclet |
10 | 287 |
* @param context the context of the link. |
288 |
* @param classDoc the class to link to. |
|
289 |
* @param where the value of the marker #. |
|
17560 | 290 |
* @param label the plain-text label for the link. |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
291 |
* @param isStrong true if the link should be strong. |
10 | 292 |
*/ |
14542 | 293 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
294 |
Kind context, ClassDoc classDoc, String where, String label, |
14542 | 295 |
boolean isStrong) { |
17560 | 296 |
this(configuration, context, classDoc, where, new StringContent(label), |
297 |
isStrong, ""); |
|
298 |
} |
|
299 |
||
300 |
/** |
|
301 |
* Construct a LinkInfo object. |
|
302 |
* |
|
303 |
* @param configuration the configuration data for the doclet |
|
304 |
* @param context the context of the link. |
|
305 |
* @param classDoc the class to link to. |
|
306 |
* @param where the value of the marker #. |
|
307 |
* @param label the label for the link. |
|
308 |
* @param isStrong true if the link should be strong. |
|
309 |
*/ |
|
310 |
public LinkInfoImpl(ConfigurationImpl configuration, |
|
311 |
Kind context, ClassDoc classDoc, String where, Content label, |
|
312 |
boolean isStrong) { |
|
313 |
this(configuration, context, classDoc, where, label, |
|
314 |
isStrong, ""); |
|
315 |
} |
|
316 |
||
317 |
/** |
|
318 |
* Construct a LinkInfo object. |
|
319 |
* |
|
320 |
* @param configuration the configuration data for the doclet |
|
321 |
* @param classDoc the class to link to. |
|
322 |
* @param label the label for the link. |
|
323 |
*/ |
|
324 |
public LinkInfoImpl(ConfigurationImpl configuration, |
|
325 |
ClassDoc classDoc, Content label) { |
|
14542 | 326 |
this.configuration = configuration; |
10 | 327 |
this.classDoc = classDoc; |
328 |
this.label = label; |
|
329 |
setContext(context); |
|
330 |
} |
|
331 |
||
332 |
/** |
|
333 |
* Construct a LinkInfo object. |
|
334 |
* |
|
14542 | 335 |
* @param configuration the configuration data for the doclet |
10 | 336 |
* @param classDoc the class to link to. |
337 |
* @param label the label for the link. |
|
338 |
*/ |
|
14542 | 339 |
public LinkInfoImpl(ConfigurationImpl configuration, |
340 |
ClassDoc classDoc, String label) { |
|
341 |
this.configuration = configuration; |
|
10 | 342 |
this.classDoc = classDoc; |
17560 | 343 |
this.label = new StringContent(label); |
10 | 344 |
setContext(context); |
345 |
} |
|
346 |
||
347 |
/** |
|
348 |
* Construct a LinkInfo object. |
|
349 |
* |
|
14542 | 350 |
* @param configuration the configuration data for the doclet |
10 | 351 |
* @param context the context of the link. |
352 |
* @param executableMemberDoc the member to link to. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
353 |
* @param isStrong true if the link should be strong. |
10 | 354 |
*/ |
14542 | 355 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
356 |
Kind context, ExecutableMemberDoc executableMemberDoc, |
14542 | 357 |
boolean isStrong) { |
358 |
this.configuration = configuration; |
|
10 | 359 |
this.executableMemberDoc = executableMemberDoc; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
360 |
this.isStrong = isStrong; |
10 | 361 |
setContext(context); |
362 |
} |
|
363 |
||
364 |
/** |
|
365 |
* Construct a LinkInfo object. |
|
366 |
* |
|
14542 | 367 |
* @param configuration the configuration data for the doclet |
10 | 368 |
* @param context the context of the link. |
369 |
* @param classDoc the class to link to. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
370 |
* @param isStrong true if the link should be strong. |
10 | 371 |
*/ |
14542 | 372 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
373 |
Kind context, ClassDoc classDoc, boolean isStrong) { |
14542 | 374 |
this.configuration = configuration; |
10 | 375 |
this.classDoc = classDoc; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
376 |
this.isStrong = isStrong; |
10 | 377 |
setContext(context); |
378 |
} |
|
379 |
||
380 |
/** |
|
381 |
* Construct a LinkInfo object. |
|
382 |
* |
|
14542 | 383 |
* @param configuration the configuration data for the doclet |
10 | 384 |
* @param context the context of the link. |
385 |
* @param type the class to link to. |
|
386 |
*/ |
|
14542 | 387 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
388 |
Kind context, Type type) { |
14542 | 389 |
this.configuration = configuration; |
10 | 390 |
this.type = type; |
391 |
setContext(context); |
|
392 |
} |
|
393 |
||
394 |
/** |
|
395 |
* Construct a LinkInfo object. |
|
396 |
* |
|
14542 | 397 |
* @param configuration the configuration data for the doclet |
10 | 398 |
* @param context the context of the link. |
399 |
* @param type the class to link to. |
|
400 |
* @param isVarArg true if this is a link to a var arg. |
|
401 |
*/ |
|
14542 | 402 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
403 |
Kind context, Type type, boolean isVarArg) { |
14542 | 404 |
this.configuration = configuration; |
10 | 405 |
this.type = type; |
406 |
this.isVarArg = isVarArg; |
|
407 |
setContext(context); |
|
408 |
} |
|
409 |
||
410 |
/** |
|
411 |
* Construct a LinkInfo object. |
|
412 |
* |
|
14542 | 413 |
* @param configuration the configuration data for the doclet |
10 | 414 |
* @param context the context of the link. |
415 |
* @param type the class to link to. |
|
17560 | 416 |
* @param label plain-text label for the link. |
417 |
* @param isStrong true if the link should be strong. |
|
418 |
*/ |
|
419 |
public LinkInfoImpl(ConfigurationImpl configuration, |
|
420 |
Kind context, Type type, String label, |
|
421 |
boolean isStrong) { |
|
422 |
this(configuration, context, type, new StringContent(label), isStrong); |
|
423 |
} |
|
424 |
||
425 |
/** |
|
426 |
* Construct a LinkInfo object. |
|
427 |
* |
|
428 |
* @param configuration the configuration data for the doclet |
|
429 |
* @param context the context of the link. |
|
430 |
* @param type the class to link to. |
|
10 | 431 |
* @param label the label for the link. |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
432 |
* @param isStrong true if the link should be strong. |
10 | 433 |
*/ |
14542 | 434 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17560 | 435 |
Kind context, Type type, Content label, |
14542 | 436 |
boolean isStrong) { |
437 |
this.configuration = configuration; |
|
10 | 438 |
this.type = type; |
439 |
this.label = label; |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
440 |
this.isStrong = isStrong; |
10 | 441 |
setContext(context); |
442 |
} |
|
443 |
||
444 |
/** |
|
445 |
* Construct a LinkInfo object. |
|
446 |
* |
|
14542 | 447 |
* @param configuration the configuration data for the doclet |
10 | 448 |
* @param context the context of the link. |
449 |
* @param classDoc the class to link to. |
|
17560 | 450 |
* @param label plain-text label for the link. |
451 |
* @param isStrong true if the link should be strong. |
|
452 |
*/ |
|
453 |
public LinkInfoImpl(ConfigurationImpl configuration, |
|
454 |
Kind context, ClassDoc classDoc, String label, |
|
455 |
boolean isStrong) { |
|
456 |
this(configuration, context, classDoc, new StringContent(label), isStrong); |
|
457 |
} |
|
458 |
||
459 |
/** |
|
460 |
* Construct a LinkInfo object. |
|
461 |
* |
|
462 |
* @param configuration the configuration data for the doclet |
|
463 |
* @param context the context of the link. |
|
464 |
* @param classDoc the class to link to. |
|
10 | 465 |
* @param label the label for the link. |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
466 |
* @param isStrong true if the link should be strong. |
10 | 467 |
*/ |
14542 | 468 |
public LinkInfoImpl(ConfigurationImpl configuration, |
17560 | 469 |
Kind context, ClassDoc classDoc, Content label, |
14542 | 470 |
boolean isStrong) { |
471 |
this.configuration = configuration; |
|
10 | 472 |
this.classDoc = classDoc; |
473 |
this.label = label; |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
474 |
this.isStrong = isStrong; |
10 | 475 |
setContext(context); |
476 |
} |
|
477 |
||
478 |
/** |
|
479 |
* {@inheritDoc} |
|
480 |
*/ |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
481 |
public Kind getContext() { |
10 | 482 |
return context; |
483 |
} |
|
484 |
||
485 |
/** |
|
486 |
* {@inheritDoc} |
|
487 |
* |
|
488 |
* This method sets the link attributes to the appropriate values |
|
489 |
* based on the context. |
|
490 |
* |
|
491 |
* @param c the context id to set. |
|
492 |
*/ |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
493 |
public final void setContext(Kind c) { |
10 | 494 |
//NOTE: Put context specific link code here. |
495 |
switch (c) { |
|
496 |
case ALL_CLASSES_FRAME: |
|
497 |
case PACKAGE_FRAME: |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
498 |
case IMPLEMENTED_CLASSES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
499 |
case SUBCLASSES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
500 |
case METHOD_DOC_COPY: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
501 |
case FIELD_DOC_COPY: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
502 |
case PROPERTY_DOC_COPY: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
503 |
case CLASS_USE_HEADER: |
10 | 504 |
includeTypeInClassLinkLabel = false; |
505 |
break; |
|
506 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
507 |
case ANNOTATION: |
10 | 508 |
excludeTypeParameterLinks = true; |
509 |
excludeTypeBounds = true; |
|
510 |
break; |
|
511 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
512 |
case IMPLEMENTED_INTERFACES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
513 |
case SUPER_INTERFACES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
514 |
case SUBINTERFACES: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
515 |
case CLASS_TREE_PARENT: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
516 |
case TREE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
517 |
case CLASS_SIGNATURE_PARENT_NAME: |
10 | 518 |
excludeTypeParameterLinks = true; |
519 |
excludeTypeBounds = true; |
|
520 |
includeTypeInClassLinkLabel = false; |
|
521 |
includeTypeAsSepLink = true; |
|
522 |
break; |
|
523 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
524 |
case PACKAGE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
525 |
case CLASS_USE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
526 |
case CLASS_HEADER: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
527 |
case CLASS_SIGNATURE: |
10 | 528 |
excludeTypeParameterLinks = true; |
529 |
includeTypeAsSepLink = true; |
|
530 |
includeTypeInClassLinkLabel = false; |
|
531 |
break; |
|
532 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
533 |
case MEMBER_TYPE_PARAMS: |
10 | 534 |
includeTypeAsSepLink = true; |
535 |
includeTypeInClassLinkLabel = false; |
|
536 |
break; |
|
537 |
||
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
538 |
case RETURN_TYPE: |
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
539 |
case SUMMARY_RETURN_TYPE: |
15385 | 540 |
excludeTypeBounds = true; |
541 |
break; |
|
17558
eee4ccf66cfd
8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents:
16319
diff
changeset
|
542 |
case EXECUTABLE_MEMBER_PARAM: |
10 | 543 |
excludeTypeBounds = true; |
544 |
break; |
|
545 |
} |
|
546 |
context = c; |
|
547 |
if (type != null && |
|
548 |
type.asTypeVariable()!= null && |
|
549 |
type.asTypeVariable().owner() instanceof ExecutableMemberDoc){ |
|
550 |
excludeTypeParameterLinks = true; |
|
551 |
} |
|
552 |
} |
|
553 |
||
554 |
/** |
|
555 |
* Return true if this link is linkable and false if we can't link to the |
|
556 |
* desired place. |
|
557 |
* |
|
558 |
* @return true if this link is linkable and false if we can't link to the |
|
559 |
* desired place. |
|
560 |
*/ |
|
561 |
public boolean isLinkable() { |
|
14542 | 562 |
return Util.isLinkable(classDoc, configuration); |
10 | 563 |
} |
564 |
} |