src/jdk.javadoc/share/classes/com/sun/javadoc/SeeTag.java
author ksrini
Fri, 09 Feb 2018 13:58:17 -0800
changeset 48840 5e2d2067da48
parent 47216 71c04702a3d5
permissions -rw-r--r--
8194651: javadoc: mark the com.sun.javadoc API for removal Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
48840
5e2d2067da48 8194651: javadoc: mark the com.sun.javadoc API for removal
ksrini
parents: 47216
diff changeset
     2
 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.javadoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
 * Represents a user-defined cross-reference to related documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 * The tag can reference a package, class or member, or can hold
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
 * plain text.  (The plain text might be a reference
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
 * to something not online, such as a printed book, or be a hard-coded
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
 * HTML link.)  The reference can either be inline with the comment,
23137
209daac13c8b 8035878: javadoc tool documentation should be using {@code ..} specifier
jjg
parents: 23136
diff changeset
    34
 * using {@code {@link}}, or a separate block comment,
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    35
 * using {@code @see}.
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    36
 * Method {@code name()} returns "@link" (no curly braces) or
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * "@see", depending on the tag.
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    38
 * Method {@code kind()} returns "@see" for both tags.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * @author Kaiyang Liu (original)
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 * @author Robert Field (rewrite)
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * @author Atul M Dambalkar
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 *
38617
d93a7f64e231 8157606: deprecate com.sun.javadoc API
jjg
parents: 25874
diff changeset
    44
 * @deprecated
d93a7f64e231 8157606: deprecate com.sun.javadoc API
jjg
parents: 25874
diff changeset
    45
 *   The declarations in this package have been superseded by those
d93a7f64e231 8157606: deprecate com.sun.javadoc API
jjg
parents: 25874
diff changeset
    46
 *   in the package {@code jdk.javadoc.doclet}.
d93a7f64e231 8157606: deprecate com.sun.javadoc API
jjg
parents: 25874
diff changeset
    47
 *   For more information, see the <i>Migration Guide</i> in the documentation for that package.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 */
48840
5e2d2067da48 8194651: javadoc: mark the com.sun.javadoc API for removal
ksrini
parents: 47216
diff changeset
    49
@Deprecated(since="9", forRemoval=true)
5e2d2067da48 8194651: javadoc: mark the com.sun.javadoc API for removal
ksrini
parents: 47216
diff changeset
    50
@SuppressWarnings("removal")
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
public interface SeeTag extends Tag {
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
    /**
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    54
     * Get the label of the {@code @see} tag.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
     * Return null if no label is present.
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
     * For example, for:
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
     * <p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    58
     *    &nbsp;&nbsp;{@code @see String#trim() the trim method}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
     * </p>
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     * return "the trim method".
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    61
     *
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    62
     * @return "the trim method".
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    String label();
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    /**
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    67
     * Get the package doc when {@code @see} references only a package.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     * Return null if the package cannot be found, or if
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    69
     * {@code @see} references any other element (class,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * interface, field, constructor, method) or non-element.
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     * For example, for:
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
     * <p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    73
     *   &nbsp;&nbsp;{@code @see java.lang}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
     * </p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    75
     * return the {@code PackageDoc} for {@code java.lang}.
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    76
     *
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    77
     * @return the {@code PackageDoc} for {@code java.lang}.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    public PackageDoc referencedPackage();
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
    /**
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    82
     * Get the class or interface name of the {@code @see} reference.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
     * The name is fully qualified if the name specified in the
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    84
     * original {@code @see} tag was fully qualified, or if the class
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
     * or interface can be found; otherwise it is unqualified.
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    86
     * If {@code @see} references only a package name, then return
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
     * the package name instead.
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
     * For example, for:
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
     * <p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    90
     *   &nbsp;&nbsp;{@code @see String#valueOf(java.lang.Object)}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
     * </p>
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
     * return "java.lang.String".
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    93
     * For "{@code @see java.lang}", return "java.lang".
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    94
     * Return null if {@code @see} references a non-element, such as
23137
209daac13c8b 8035878: javadoc tool documentation should be using {@code ..} specifier
jjg
parents: 23136
diff changeset
    95
     * {@code @see <a href="java.sun.com">}.
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    96
     *
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
    97
     * @return null if {@code @see} references a non-element, such as
23137
209daac13c8b 8035878: javadoc tool documentation should be using {@code ..} specifier
jjg
parents: 23136
diff changeset
    98
     * {@code @see <a href="java.sun.com">}.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
    String referencedClassName();
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
     * Get the class doc referenced by the class name part of @see.
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
     * Return null if the class cannot be found.
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
     * For example, for:
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
     * <p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   107
     *   &nbsp;&nbsp;{@code @see String#valueOf(java.lang.Object)}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
     * </p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   109
     * return the {@code ClassDoc} for {@code java.lang.String}.
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   110
     *
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   111
     * @return the {@code ClassDoc} for {@code java.lang.String}.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
    ClassDoc referencedClass();
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
    /**
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   116
     * Get the field, constructor or method substring of the {@code @see}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
     * reference. Return null if the reference is to any other
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
     * element or to any non-element.
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
     * References to member classes (nested classes) return null.
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
     * For example, for:
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
     * <p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   122
     *   &nbsp;&nbsp;{@code @see String#startsWith(String)}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
     * </p>
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
     * return "startsWith(String)".
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   125
     *
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   126
     * @return "startsWith(String)".
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
    String referencedMemberName();
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
     * Get the member doc for the field, constructor or method
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   132
     * referenced by {@code @see}. Return null if the member cannot
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
     * be found or if the reference is to any other element or to any
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
     * non-element.
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
     * References to member classes (nested classes) return null.
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
     * For example, for:
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
     * <p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   138
     *   &nbsp;&nbsp;{@code @see String#startsWith(java.lang.String)}
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
     * </p>
23136
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   140
     * return the {@code MethodDoc} for {@code startsWith}.
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   141
     *
aa8958a4c8f4 8035877: javadoc classes are missing @return and @param tags
jjg
parents: 5520
diff changeset
   142
     * @return the {@code MethodDoc} for {@code startsWith}.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
    MemberDoc referencedMember();
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
}