KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > javadoc > SeeTag


1 /*
2  * @(#)SeeTag.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.javadoc;
9
10 /**
11  * Represents a user-defined cross-reference to related documentation.
12  * The tag can reference a package, class or member, or can hold
13  * plain text. (The plain text might be a reference
14  * to something not online, such as a printed book, or be a hard-coded
15  * HTML link.) The reference can either be inline with the comment,
16  * using <code>&#123;@link}</code>, or a separate block comment,
17  * using <code>@see</code>.
18  * Method <code>name()</code> returns "@link" (no curly braces) or
19  * "@see", depending on the tag.
20  * Method <code>kind()</code> returns "@see" for both tags.
21  *
22  * @version 06/10/97
23  * @author Kaiyang Liu (original)
24  * @author Robert Field (rewrite)
25  * @author Atul M Dambalkar
26  *
27  */

28 public interface SeeTag extends Tag {
29
30     /**
31      * Get the label of the <code>@see</code> tag.
32      * Return null if no label is present.
33      * For example, for:
34      * <p>
35      * &nbsp;&nbsp;<code>@see String#trim() the trim method</code>
36      * </p>
37      * return "the trim method".
38      */

39     String JavaDoc label();
40
41     /**
42      * Get the package doc when <code>@see</code> references only a package.
43      * Return null if the package cannot be found, or if
44      * <code>@see</code> references any other element (class,
45      * interface, field, constructor, method) or non-element.
46      * For example, for:
47      * <p>
48      * &nbsp;&nbsp;<code>@see java.lang</code>
49      * </p>
50      * return the <code>PackageDoc</code> for <code>java.lang</code>.
51      */

52     public PackageDoc referencedPackage();
53
54     /**
55      * Get the class or interface name of the <code>@see</code> reference.
56      * The name is fully qualified if the name specified in the
57      * original <code>@see</code> tag was fully qualified, or if the class
58      * or interface can be found; otherwise it is unqualified.
59      * If <code>@see</code> references only a package name, then return
60      * the package name instead.
61      * For example, for:
62      * <p>
63      * &nbsp;&nbsp;<code>@see String#valueOf(java.lang.Object)</code>
64      * </p>
65      * return "java.lang.String".
66      * For "<code>@see java.lang</code>", return "java.lang".
67      * Return null if <code>@see</code> references a non-element, such as
68      * <code>@see &lt;a HREF="java.sun.com"&gt;</code>.
69      */

70     String JavaDoc referencedClassName();
71
72     /**
73      * Get the class doc referenced by the class name part of @see.
74      * Return null if the class cannot be found.
75      * For example, for:
76      * <p>
77      * &nbsp;&nbsp;<code>@see String#valueOf(java.lang.Object)</code>
78      * </p>
79      * return the <code>ClassDoc</code> for <code>java.lang.String</code>.
80      */

81     ClassDoc referencedClass();
82
83     /**
84      * Get the field, constructor or method substring of the <code>@see</code>
85      * reference. Return null if the reference is to any other
86      * element or to any non-element.
87      * References to member classes (nested classes) return null.
88      * For example, for:
89      * <p>
90      * &nbsp;&nbsp;<code>@see String#startsWith(String)</code>
91      * </p>
92      * return "startsWith(String)".
93      */

94     String JavaDoc referencedMemberName();
95
96     /**
97      * Get the member doc for the field, constructor or method
98      * referenced by <code>@see</code>. Return null if the member cannot
99      * be found or if the reference is to any other element or to any
100      * non-element.
101      * References to member classes (nested classes) return null.
102      * For example, for:
103      * <p>
104      * &nbsp;&nbsp;<code>@see String#startsWith(java.lang.String)</code>
105      * </p>
106      * return the <code>MethodDoc</code> for <code>startsWith</code>.
107      */

108     MemberDoc referencedMember();
109 }
110
Popular Tags