1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/com/sun/javadoc/SeeTag.java Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,126 @@ 1.4 +/* 1.5 + * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Sun designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Sun in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 1.26 + * have any questions. 1.27 + */ 1.28 + 1.29 +package com.sun.javadoc; 1.30 + 1.31 +/** 1.32 + * Represents a user-defined cross-reference to related documentation. 1.33 + * The tag can reference a package, class or member, or can hold 1.34 + * plain text. (The plain text might be a reference 1.35 + * to something not online, such as a printed book, or be a hard-coded 1.36 + * HTML link.) The reference can either be inline with the comment, 1.37 + * using <code>{@link}</code>, or a separate block comment, 1.38 + * using <code>@see</code>. 1.39 + * Method <code>name()</code> returns "@link" (no curly braces) or 1.40 + * "@see", depending on the tag. 1.41 + * Method <code>kind()</code> returns "@see" for both tags. 1.42 + * 1.43 + * @author Kaiyang Liu (original) 1.44 + * @author Robert Field (rewrite) 1.45 + * @author Atul M Dambalkar 1.46 + * 1.47 + */ 1.48 +public interface SeeTag extends Tag { 1.49 + 1.50 + /** 1.51 + * Get the label of the <code>@see</code> tag. 1.52 + * Return null if no label is present. 1.53 + * For example, for: 1.54 + * <p> 1.55 + * <code>@see String#trim() the trim method</code> 1.56 + * </p> 1.57 + * return "the trim method". 1.58 + */ 1.59 + String label(); 1.60 + 1.61 + /** 1.62 + * Get the package doc when <code>@see</code> references only a package. 1.63 + * Return null if the package cannot be found, or if 1.64 + * <code>@see</code> references any other element (class, 1.65 + * interface, field, constructor, method) or non-element. 1.66 + * For example, for: 1.67 + * <p> 1.68 + * <code>@see java.lang</code> 1.69 + * </p> 1.70 + * return the <code>PackageDoc</code> for <code>java.lang</code>. 1.71 + */ 1.72 + public PackageDoc referencedPackage(); 1.73 + 1.74 + /** 1.75 + * Get the class or interface name of the <code>@see</code> reference. 1.76 + * The name is fully qualified if the name specified in the 1.77 + * original <code>@see</code> tag was fully qualified, or if the class 1.78 + * or interface can be found; otherwise it is unqualified. 1.79 + * If <code>@see</code> references only a package name, then return 1.80 + * the package name instead. 1.81 + * For example, for: 1.82 + * <p> 1.83 + * <code>@see String#valueOf(java.lang.Object)</code> 1.84 + * </p> 1.85 + * return "java.lang.String". 1.86 + * For "<code>@see java.lang</code>", return "java.lang". 1.87 + * Return null if <code>@see</code> references a non-element, such as 1.88 + * <code>@see <a href="java.sun.com"></code>. 1.89 + */ 1.90 + String referencedClassName(); 1.91 + 1.92 + /** 1.93 + * Get the class doc referenced by the class name part of @see. 1.94 + * Return null if the class cannot be found. 1.95 + * For example, for: 1.96 + * <p> 1.97 + * <code>@see String#valueOf(java.lang.Object)</code> 1.98 + * </p> 1.99 + * return the <code>ClassDoc</code> for <code>java.lang.String</code>. 1.100 + */ 1.101 + ClassDoc referencedClass(); 1.102 + 1.103 + /** 1.104 + * Get the field, constructor or method substring of the <code>@see</code> 1.105 + * reference. Return null if the reference is to any other 1.106 + * element or to any non-element. 1.107 + * References to member classes (nested classes) return null. 1.108 + * For example, for: 1.109 + * <p> 1.110 + * <code>@see String#startsWith(String)</code> 1.111 + * </p> 1.112 + * return "startsWith(String)". 1.113 + */ 1.114 + String referencedMemberName(); 1.115 + 1.116 + /** 1.117 + * Get the member doc for the field, constructor or method 1.118 + * referenced by <code>@see</code>. Return null if the member cannot 1.119 + * be found or if the reference is to any other element or to any 1.120 + * non-element. 1.121 + * References to member classes (nested classes) return null. 1.122 + * For example, for: 1.123 + * <p> 1.124 + * <code>@see String#startsWith(java.lang.String)</code> 1.125 + * </p> 1.126 + * return the <code>MethodDoc</code> for <code>startsWith</code>. 1.127 + */ 1.128 + MemberDoc referencedMember(); 1.129 +}