src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java

changeset 1410
bfec2a1cc869
parent 1359
25e14ad23cef
child 1521
71f35e4b93a5
equal deleted inserted replaced
1409:33abf479f202 1410:bfec2a1cc869
196 /** 196 /**
197 * Indicate that the link appears in class use documentation. 197 * Indicate that the link appears in class use documentation.
198 */ 198 */
199 public static final int CONTEXT_CLASS_USE_HEADER = 33; 199 public static final int CONTEXT_CLASS_USE_HEADER = 33;
200 200
201 public final ConfigurationImpl configuration;
202
201 /** 203 /**
202 * The integer indicating the location of the link. 204 * The integer indicating the location of the link.
203 */ 205 */
204 public int context; 206 public int context;
205 207
212 * String style of text defined in style sheet. 214 * String style of text defined in style sheet.
213 */ 215 */
214 public String styleName =""; 216 public String styleName ="";
215 217
216 /** 218 /**
217 * The valueof the target. 219 * The value of the target.
218 */ 220 */
219 public String target = ""; 221 public String target = "";
220 222
221 /** 223 /**
222 * Construct a LinkInfo object. 224 * Construct a LinkInfo object.
223 * 225 *
226 * @param configuration the configuration data for the doclet
224 * @param context the context of the link. 227 * @param context the context of the link.
225 * @param classDoc the class to link to. 228 * @param classDoc the class to link to.
226 * @param label the label for the link. 229 * @param label the label for the link.
227 * @param target the value of the target attribute. 230 * @param target the value of the target attribute.
228 */ 231 */
229 public LinkInfoImpl (int context, ClassDoc classDoc, String label, 232 public LinkInfoImpl(ConfigurationImpl configuration,
230 String target){ 233 int context, ClassDoc classDoc, String label, String target) {
234 this.configuration = configuration;
231 this.classDoc = classDoc; 235 this.classDoc = classDoc;
232 this.label = label; 236 this.label = label;
233 this.target = target; 237 this.target = target;
234 setContext(context); 238 setContext(context);
235 } 239 }
236 240
237 /** 241 /**
238 * Construct a LinkInfo object. 242 * Construct a LinkInfo object.
239 * 243 *
244 * @param configuration the configuration data for the doclet
240 * @param context the context of the link. 245 * @param context the context of the link.
241 * @param classDoc the class to link to. 246 * @param classDoc the class to link to.
242 * @param where the value of the marker #. 247 * @param where the value of the marker #.
243 * @param label the label for the link. 248 * @param label the label for the link.
244 * @param isStrong true if the link should be strong. 249 * @param isStrong true if the link should be strong.
245 * @param styleName String style of text defined in style sheet. 250 * @param styleName String style of text defined in style sheet.
246 */ 251 */
247 public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label, 252 public LinkInfoImpl(ConfigurationImpl configuration,
248 boolean isStrong, String styleName){ 253 int context, ClassDoc classDoc, String where, String label,
254 boolean isStrong, String styleName) {
255 this.configuration = configuration;
249 this.classDoc = classDoc; 256 this.classDoc = classDoc;
250 this.where = where; 257 this.where = where;
251 this.label = label; 258 this.label = label;
252 this.isStrong = isStrong; 259 this.isStrong = isStrong;
253 this.styleName = styleName; 260 this.styleName = styleName;
255 } 262 }
256 263
257 /** 264 /**
258 * Construct a LinkInfo object. 265 * Construct a LinkInfo object.
259 * 266 *
267 * @param configuration the configuration data for the doclet
260 * @param context the context of the link. 268 * @param context the context of the link.
261 * @param classDoc the class to link to. 269 * @param classDoc the class to link to.
262 * @param where the value of the marker #. 270 * @param where the value of the marker #.
263 * @param label the label for the link. 271 * @param label the label for the link.
264 * @param isStrong true if the link should be strong. 272 * @param isStrong true if the link should be strong.
265 */ 273 */
266 public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label, 274 public LinkInfoImpl(ConfigurationImpl configuration,
267 boolean isStrong){ 275 int context, ClassDoc classDoc, String where, String label,
276 boolean isStrong) {
277 this.configuration = configuration;
268 this.classDoc = classDoc; 278 this.classDoc = classDoc;
269 this.where = where; 279 this.where = where;
270 this.label = label; 280 this.label = label;
271 this.isStrong = isStrong; 281 this.isStrong = isStrong;
272 setContext(context); 282 setContext(context);
273 } 283 }
274 284
275 /** 285 /**
276 * Construct a LinkInfo object. 286 * Construct a LinkInfo object.
277 * 287 *
278 * @param classDoc the class to link to. 288 * @param configuration the configuration data for the doclet
279 * @param label the label for the link. 289 * @param classDoc the class to link to.
280 */ 290 * @param label the label for the link.
281 public LinkInfoImpl (ClassDoc classDoc, String label){ 291 */
282 this.classDoc = classDoc; 292 public LinkInfoImpl(ConfigurationImpl configuration,
283 this.label = label; 293 ClassDoc classDoc, String label) {
284 setContext(context); 294 this.configuration = configuration;
285 } 295 this.classDoc = classDoc;
286 296 this.label = label;
287 /** 297 setContext(context);
288 * Construct a LinkInfo object. 298 }
289 * 299
300 /**
301 * Construct a LinkInfo object.
302 *
303 * @param configuration the configuration data for the doclet
290 * @param context the context of the link. 304 * @param context the context of the link.
291 * @param executableMemberDoc the member to link to. 305 * @param executableMemberDoc the member to link to.
292 * @param isStrong true if the link should be strong. 306 * @param isStrong true if the link should be strong.
293 */ 307 */
294 public LinkInfoImpl (int context, ExecutableMemberDoc executableMemberDoc, 308 public LinkInfoImpl(ConfigurationImpl configuration,
295 boolean isStrong){ 309 int context, ExecutableMemberDoc executableMemberDoc,
310 boolean isStrong) {
311 this.configuration = configuration;
296 this.executableMemberDoc = executableMemberDoc; 312 this.executableMemberDoc = executableMemberDoc;
297 this.isStrong = isStrong; 313 this.isStrong = isStrong;
298 setContext(context); 314 setContext(context);
299 } 315 }
300 316
301 /** 317 /**
302 * Construct a LinkInfo object. 318 * Construct a LinkInfo object.
303 * 319 *
320 * @param configuration the configuration data for the doclet
304 * @param context the context of the link. 321 * @param context the context of the link.
305 * @param classDoc the class to link to. 322 * @param classDoc the class to link to.
306 * @param isStrong true if the link should be strong. 323 * @param isStrong true if the link should be strong.
307 */ 324 */
308 public LinkInfoImpl (int context, ClassDoc classDoc, boolean isStrong){ 325 public LinkInfoImpl(ConfigurationImpl configuration,
309 this.classDoc = classDoc; 326 int context, ClassDoc classDoc, boolean isStrong) {
310 this.isStrong = isStrong; 327 this.configuration = configuration;
311 setContext(context); 328 this.classDoc = classDoc;
312 } 329 this.isStrong = isStrong;
313 330 setContext(context);
314 /** 331 }
315 * Construct a LinkInfo object. 332
316 * 333 /**
334 * Construct a LinkInfo object.
335 *
336 * @param configuration the configuration data for the doclet
317 * @param context the context of the link. 337 * @param context the context of the link.
318 * @param type the class to link to. 338 * @param type the class to link to.
319 */ 339 */
320 public LinkInfoImpl (int context, Type type){ 340 public LinkInfoImpl(ConfigurationImpl configuration,
341 int context, Type type) {
342 this.configuration = configuration;
321 this.type = type; 343 this.type = type;
322 setContext(context); 344 setContext(context);
323 } 345 }
324 346
325 /** 347 /**
326 * Construct a LinkInfo object. 348 * Construct a LinkInfo object.
327 * 349 *
350 * @param configuration the configuration data for the doclet
328 * @param context the context of the link. 351 * @param context the context of the link.
329 * @param type the class to link to. 352 * @param type the class to link to.
330 * @param isVarArg true if this is a link to a var arg. 353 * @param isVarArg true if this is a link to a var arg.
331 */ 354 */
332 public LinkInfoImpl (int context, Type type, boolean isVarArg){ 355 public LinkInfoImpl(ConfigurationImpl configuration,
356 int context, Type type, boolean isVarArg) {
357 this.configuration = configuration;
333 this.type = type; 358 this.type = type;
334 this.isVarArg = isVarArg; 359 this.isVarArg = isVarArg;
335 setContext(context); 360 setContext(context);
336 } 361 }
337 362
338 /** 363 /**
339 * Construct a LinkInfo object. 364 * Construct a LinkInfo object.
340 * 365 *
366 * @param configuration the configuration data for the doclet
341 * @param context the context of the link. 367 * @param context the context of the link.
342 * @param type the class to link to. 368 * @param type the class to link to.
343 * @param label the label for the link. 369 * @param label the label for the link.
344 * @param isStrong true if the link should be strong. 370 * @param isStrong true if the link should be strong.
345 */ 371 */
346 public LinkInfoImpl (int context, Type type, String label, 372 public LinkInfoImpl(ConfigurationImpl configuration,
347 boolean isStrong){ 373 int context, Type type, String label,
374 boolean isStrong) {
375 this.configuration = configuration;
348 this.type = type; 376 this.type = type;
349 this.label = label; 377 this.label = label;
350 this.isStrong = isStrong; 378 this.isStrong = isStrong;
351 setContext(context); 379 setContext(context);
352 } 380 }
353 381
354 /** 382 /**
355 * Construct a LinkInfo object. 383 * Construct a LinkInfo object.
356 * 384 *
385 * @param configuration the configuration data for the doclet
357 * @param context the context of the link. 386 * @param context the context of the link.
358 * @param classDoc the class to link to. 387 * @param classDoc the class to link to.
359 * @param label the label for the link. 388 * @param label the label for the link.
360 * @param isStrong true if the link should be strong. 389 * @param isStrong true if the link should be strong.
361 */ 390 */
362 public LinkInfoImpl (int context, ClassDoc classDoc, String label, 391 public LinkInfoImpl(ConfigurationImpl configuration,
363 boolean isStrong){ 392 int context, ClassDoc classDoc, String label,
393 boolean isStrong) {
394 this.configuration = configuration;
364 this.classDoc = classDoc; 395 this.classDoc = classDoc;
365 this.label = label; 396 this.label = label;
366 this.isStrong = isStrong; 397 this.isStrong = isStrong;
367 setContext(context); 398 setContext(context);
368 } 399 }
446 * 477 *
447 * @return true if this link is linkable and false if we can't link to the 478 * @return true if this link is linkable and false if we can't link to the
448 * desired place. 479 * desired place.
449 */ 480 */
450 public boolean isLinkable() { 481 public boolean isLinkable() {
451 return Util.isLinkable(classDoc, ConfigurationImpl.getInstance()); 482 return Util.isLinkable(classDoc, configuration);
452 } 483 }
453 } 484 }

mercurial