duke@1: /* ohair@554: * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@554: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@554: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. duke@1: */ duke@1: duke@1: package com.sun.javadoc; duke@1: duke@1: /** duke@1: * Represents a user-defined cross-reference to related documentation. duke@1: * The tag can reference a package, class or member, or can hold duke@1: * plain text. (The plain text might be a reference duke@1: * to something not online, such as a printed book, or be a hard-coded duke@1: * HTML link.) The reference can either be inline with the comment, duke@1: * using {@link}, or a separate block comment, duke@1: * using @see. duke@1: * Method name() returns "@link" (no curly braces) or duke@1: * "@see", depending on the tag. duke@1: * Method kind() returns "@see" for both tags. duke@1: * duke@1: * @author Kaiyang Liu (original) duke@1: * @author Robert Field (rewrite) duke@1: * @author Atul M Dambalkar duke@1: * duke@1: */ duke@1: public interface SeeTag extends Tag { duke@1: duke@1: /** duke@1: * Get the label of the @see tag. duke@1: * Return null if no label is present. duke@1: * For example, for: duke@1: *

duke@1: *   @see String#trim() the trim method duke@1: *

duke@1: * return "the trim method". duke@1: */ duke@1: String label(); duke@1: duke@1: /** duke@1: * Get the package doc when @see references only a package. duke@1: * Return null if the package cannot be found, or if duke@1: * @see references any other element (class, duke@1: * interface, field, constructor, method) or non-element. duke@1: * For example, for: duke@1: *

duke@1: *   @see java.lang duke@1: *

duke@1: * return the PackageDoc for java.lang. duke@1: */ duke@1: public PackageDoc referencedPackage(); duke@1: duke@1: /** duke@1: * Get the class or interface name of the @see reference. duke@1: * The name is fully qualified if the name specified in the duke@1: * original @see tag was fully qualified, or if the class duke@1: * or interface can be found; otherwise it is unqualified. duke@1: * If @see references only a package name, then return duke@1: * the package name instead. duke@1: * For example, for: duke@1: *

duke@1: *   @see String#valueOf(java.lang.Object) duke@1: *

duke@1: * return "java.lang.String". duke@1: * For "@see java.lang", return "java.lang". duke@1: * Return null if @see references a non-element, such as duke@1: * @see <a href="java.sun.com">. duke@1: */ duke@1: String referencedClassName(); duke@1: duke@1: /** duke@1: * Get the class doc referenced by the class name part of @see. duke@1: * Return null if the class cannot be found. duke@1: * For example, for: duke@1: *

duke@1: *   @see String#valueOf(java.lang.Object) duke@1: *

duke@1: * return the ClassDoc for java.lang.String. duke@1: */ duke@1: ClassDoc referencedClass(); duke@1: duke@1: /** duke@1: * Get the field, constructor or method substring of the @see duke@1: * reference. Return null if the reference is to any other duke@1: * element or to any non-element. duke@1: * References to member classes (nested classes) return null. duke@1: * For example, for: duke@1: *

duke@1: *   @see String#startsWith(String) duke@1: *

duke@1: * return "startsWith(String)". duke@1: */ duke@1: String referencedMemberName(); duke@1: duke@1: /** duke@1: * Get the member doc for the field, constructor or method duke@1: * referenced by @see. Return null if the member cannot duke@1: * be found or if the reference is to any other element or to any duke@1: * non-element. duke@1: * References to member classes (nested classes) return null. duke@1: * For example, for: duke@1: *

duke@1: *   @see String#startsWith(java.lang.String) duke@1: *

duke@1: * return the MethodDoc for startsWith. duke@1: */ duke@1: MemberDoc referencedMember(); duke@1: }