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