10
|
1 |
/*
|
5520
|
2 |
* Copyright (c) 1998, 2002, 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.javadoc;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Represents a user-defined cross-reference to related documentation.
|
|
30 |
* The tag can reference a package, class or member, or can hold
|
|
31 |
* plain text. (The plain text might be a reference
|
|
32 |
* to something not online, such as a printed book, or be a hard-coded
|
|
33 |
* HTML link.) The reference can either be inline with the comment,
|
|
34 |
* using <code>{@link}</code>, or a separate block comment,
|
|
35 |
* using <code>@see</code>.
|
|
36 |
* Method <code>name()</code> returns "@link" (no curly braces) or
|
|
37 |
* "@see", depending on the tag.
|
|
38 |
* Method <code>kind()</code> returns "@see" for both tags.
|
|
39 |
*
|
|
40 |
* @author Kaiyang Liu (original)
|
|
41 |
* @author Robert Field (rewrite)
|
|
42 |
* @author Atul M Dambalkar
|
|
43 |
*
|
|
44 |
*/
|
|
45 |
public interface SeeTag extends Tag {
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Get the label of the <code>@see</code> tag.
|
|
49 |
* Return null if no label is present.
|
|
50 |
* For example, for:
|
|
51 |
* <p>
|
|
52 |
* <code>@see String#trim() the trim method</code>
|
|
53 |
* </p>
|
|
54 |
* return "the trim method".
|
|
55 |
*/
|
|
56 |
String label();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Get the package doc when <code>@see</code> references only a package.
|
|
60 |
* Return null if the package cannot be found, or if
|
|
61 |
* <code>@see</code> references any other element (class,
|
|
62 |
* interface, field, constructor, method) or non-element.
|
|
63 |
* For example, for:
|
|
64 |
* <p>
|
|
65 |
* <code>@see java.lang</code>
|
|
66 |
* </p>
|
|
67 |
* return the <code>PackageDoc</code> for <code>java.lang</code>.
|
|
68 |
*/
|
|
69 |
public PackageDoc referencedPackage();
|
|
70 |
|
|
71 |
/**
|
|
72 |
* Get the class or interface name of the <code>@see</code> reference.
|
|
73 |
* The name is fully qualified if the name specified in the
|
|
74 |
* original <code>@see</code> tag was fully qualified, or if the class
|
|
75 |
* or interface can be found; otherwise it is unqualified.
|
|
76 |
* If <code>@see</code> references only a package name, then return
|
|
77 |
* the package name instead.
|
|
78 |
* For example, for:
|
|
79 |
* <p>
|
|
80 |
* <code>@see String#valueOf(java.lang.Object)</code>
|
|
81 |
* </p>
|
|
82 |
* return "java.lang.String".
|
|
83 |
* For "<code>@see java.lang</code>", return "java.lang".
|
|
84 |
* Return null if <code>@see</code> references a non-element, such as
|
|
85 |
* <code>@see <a href="java.sun.com"></code>.
|
|
86 |
*/
|
|
87 |
String referencedClassName();
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Get the class doc referenced by the class name part of @see.
|
|
91 |
* Return null if the class cannot be found.
|
|
92 |
* For example, for:
|
|
93 |
* <p>
|
|
94 |
* <code>@see String#valueOf(java.lang.Object)</code>
|
|
95 |
* </p>
|
|
96 |
* return the <code>ClassDoc</code> for <code>java.lang.String</code>.
|
|
97 |
*/
|
|
98 |
ClassDoc referencedClass();
|
|
99 |
|
|
100 |
/**
|
|
101 |
* Get the field, constructor or method substring of the <code>@see</code>
|
|
102 |
* reference. Return null if the reference is to any other
|
|
103 |
* element or to any non-element.
|
|
104 |
* References to member classes (nested classes) return null.
|
|
105 |
* For example, for:
|
|
106 |
* <p>
|
|
107 |
* <code>@see String#startsWith(String)</code>
|
|
108 |
* </p>
|
|
109 |
* return "startsWith(String)".
|
|
110 |
*/
|
|
111 |
String referencedMemberName();
|
|
112 |
|
|
113 |
/**
|
|
114 |
* Get the member doc for the field, constructor or method
|
|
115 |
* referenced by <code>@see</code>. Return null if the member cannot
|
|
116 |
* be found or if the reference is to any other element or to any
|
|
117 |
* non-element.
|
|
118 |
* References to member classes (nested classes) return null.
|
|
119 |
* For example, for:
|
|
120 |
* <p>
|
|
121 |
* <code>@see String#startsWith(java.lang.String)</code>
|
|
122 |
* </p>
|
|
123 |
* return the <code>MethodDoc</code> for <code>startsWith</code>.
|
|
124 |
*/
|
|
125 |
MemberDoc referencedMember();
|
|
126 |
}
|