src/share/classes/com/sun/javadoc/SeeTag.java

Sat, 01 Dec 2007 00:00:00 +0000

author
duke
date
Sat, 01 Dec 2007 00:00:00 +0000
changeset 1
9a66ca7c79fa
child 554
9d9f26857129
permissions
-rw-r--r--

Initial load

duke@1 1 /*
duke@1 2 * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation. Sun designates this
duke@1 8 * particular file as subject to the "Classpath" exception as provided
duke@1 9 * by Sun in the LICENSE file that accompanied this code.
duke@1 10 *
duke@1 11 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 14 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 15 * accompanied this code).
duke@1 16 *
duke@1 17 * You should have received a copy of the GNU General Public License version
duke@1 18 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 20 *
duke@1 21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@1 22 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@1 23 * have any questions.
duke@1 24 */
duke@1 25
duke@1 26 package com.sun.javadoc;
duke@1 27
duke@1 28 /**
duke@1 29 * Represents a user-defined cross-reference to related documentation.
duke@1 30 * The tag can reference a package, class or member, or can hold
duke@1 31 * plain text. (The plain text might be a reference
duke@1 32 * to something not online, such as a printed book, or be a hard-coded
duke@1 33 * HTML link.) The reference can either be inline with the comment,
duke@1 34 * using <code>&#123;@link}</code>, or a separate block comment,
duke@1 35 * using <code>@see</code>.
duke@1 36 * Method <code>name()</code> returns "@link" (no curly braces) or
duke@1 37 * "@see", depending on the tag.
duke@1 38 * Method <code>kind()</code> returns "@see" for both tags.
duke@1 39 *
duke@1 40 * @author Kaiyang Liu (original)
duke@1 41 * @author Robert Field (rewrite)
duke@1 42 * @author Atul M Dambalkar
duke@1 43 *
duke@1 44 */
duke@1 45 public interface SeeTag extends Tag {
duke@1 46
duke@1 47 /**
duke@1 48 * Get the label of the <code>@see</code> tag.
duke@1 49 * Return null if no label is present.
duke@1 50 * For example, for:
duke@1 51 * <p>
duke@1 52 * &nbsp;&nbsp;<code>@see String#trim() the trim method</code>
duke@1 53 * </p>
duke@1 54 * return "the trim method".
duke@1 55 */
duke@1 56 String label();
duke@1 57
duke@1 58 /**
duke@1 59 * Get the package doc when <code>@see</code> references only a package.
duke@1 60 * Return null if the package cannot be found, or if
duke@1 61 * <code>@see</code> references any other element (class,
duke@1 62 * interface, field, constructor, method) or non-element.
duke@1 63 * For example, for:
duke@1 64 * <p>
duke@1 65 * &nbsp;&nbsp;<code>@see java.lang</code>
duke@1 66 * </p>
duke@1 67 * return the <code>PackageDoc</code> for <code>java.lang</code>.
duke@1 68 */
duke@1 69 public PackageDoc referencedPackage();
duke@1 70
duke@1 71 /**
duke@1 72 * Get the class or interface name of the <code>@see</code> reference.
duke@1 73 * The name is fully qualified if the name specified in the
duke@1 74 * original <code>@see</code> tag was fully qualified, or if the class
duke@1 75 * or interface can be found; otherwise it is unqualified.
duke@1 76 * If <code>@see</code> references only a package name, then return
duke@1 77 * the package name instead.
duke@1 78 * For example, for:
duke@1 79 * <p>
duke@1 80 * &nbsp;&nbsp;<code>@see String#valueOf(java.lang.Object)</code>
duke@1 81 * </p>
duke@1 82 * return "java.lang.String".
duke@1 83 * For "<code>@see java.lang</code>", return "java.lang".
duke@1 84 * Return null if <code>@see</code> references a non-element, such as
duke@1 85 * <code>@see &lt;a href="java.sun.com"&gt;</code>.
duke@1 86 */
duke@1 87 String referencedClassName();
duke@1 88
duke@1 89 /**
duke@1 90 * Get the class doc referenced by the class name part of @see.
duke@1 91 * Return null if the class cannot be found.
duke@1 92 * For example, for:
duke@1 93 * <p>
duke@1 94 * &nbsp;&nbsp;<code>@see String#valueOf(java.lang.Object)</code>
duke@1 95 * </p>
duke@1 96 * return the <code>ClassDoc</code> for <code>java.lang.String</code>.
duke@1 97 */
duke@1 98 ClassDoc referencedClass();
duke@1 99
duke@1 100 /**
duke@1 101 * Get the field, constructor or method substring of the <code>@see</code>
duke@1 102 * reference. Return null if the reference is to any other
duke@1 103 * element or to any non-element.
duke@1 104 * References to member classes (nested classes) return null.
duke@1 105 * For example, for:
duke@1 106 * <p>
duke@1 107 * &nbsp;&nbsp;<code>@see String#startsWith(String)</code>
duke@1 108 * </p>
duke@1 109 * return "startsWith(String)".
duke@1 110 */
duke@1 111 String referencedMemberName();
duke@1 112
duke@1 113 /**
duke@1 114 * Get the member doc for the field, constructor or method
duke@1 115 * referenced by <code>@see</code>. Return null if the member cannot
duke@1 116 * be found or if the reference is to any other element or to any
duke@1 117 * non-element.
duke@1 118 * References to member classes (nested classes) return null.
duke@1 119 * For example, for:
duke@1 120 * <p>
duke@1 121 * &nbsp;&nbsp;<code>@see String#startsWith(java.lang.String)</code>
duke@1 122 * </p>
duke@1 123 * return the <code>MethodDoc</code> for <code>startsWith</code>.
duke@1 124 */
duke@1 125 MemberDoc referencedMember();
duke@1 126 }

mercurial