1 /* Doc.java -- Model of an item to document.
2 Copyright (C) 1999 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package com.sun.javadoc;
42 * This interface is the super-interface of all items that can have
43 * Javadoc comments associated with them.
45 public interface Doc extends java.io.Serializable, Comparable
49 * This method returns the text of the comment for this item, with all
52 * @return The comment text for this item.
54 public abstract String
57 /*************************************************************************/
60 * This method returns an array of all the tags in this item.
62 * @return An array of tags for this item.
67 /*************************************************************************/
70 * This method returns an array of all the tags of the specified type
73 * @param tagtype The name of the tag type to return.
75 * @return A list of all tags of the specified type.
80 /*************************************************************************/
83 * This method returns an array of all tags of the "@see" type.
85 * @return An array of tags of the "@see" type
87 public abstract SeeTag[]
90 /*************************************************************************/
93 * This method returns the comment text as an array of tags. This will
94 * include any inline tags, but no regular tags. Regular text is returned
95 * as a type of <code>Text</code>. Inline "@see" tags are returned as
96 * type <code>SeeTag</code>.
98 * @return The comment text as tags.
100 public abstract Tag[]
103 /*************************************************************************/
106 * This method returns the first sentence of the comment text as an array
107 * of tags. This will include any inline tags, but no regular tags.
108 * Regular text is returned as a type of <code>Text</code>. Inline "@see"
109 * tags are returned as type <code>SeeTag</code>.
111 * @return An array of tags representing the first sentence of the comment
114 public abstract Tag[]
117 /*************************************************************************/
120 * This method returns the text of the comment in an unprocessed format.
121 * Any Javadoc tags will remain as written in the text.
123 * @return The unprocessed comment text.
125 public abstract String
128 /*************************************************************************/
131 * This method sets the unprocessed comment text for this item.
133 * @param rawtext The unprocessed comment text for this itme.
136 setRawCommentText(String rawtext);
138 /*************************************************************************/
141 * This method returns the name of this item.
143 * @return The name of this item.
145 public abstract String
148 /*************************************************************************/
151 * This method tests whether or not this item is a field.
153 * @return <code>true</code> if this item is a field, <code>false</code>
156 public abstract boolean
159 /*************************************************************************/
162 * This method tests whether or not this item is a method.
164 * @return <code>true</code> if this item is a method, <code>false</code>
167 public abstract boolean
170 /*************************************************************************/
173 * This method tests whether or not this item is a constructor.
175 * @return <code>true</code> if this item is a constructor,
176 * <code>false</code> otherwise.
178 public abstract boolean
181 /*************************************************************************/
184 * This method tests whether or not this item is an interface.
186 * @return <code>true</code> if this item is an interface,
187 * <code>false</code> otherwise.
189 public abstract boolean
192 /*************************************************************************/
195 * This method tests whether or not this item is an exception.
197 * @return <code>true</code> if this item is an exception,
198 * <code>false</code> otherwise.
200 public abstract boolean
203 /*************************************************************************/
206 * This method tests whether or not this item is an error.
208 * @return <code>true</code> if this item is an error,
209 * <code>false</code> otherwise.
211 public abstract boolean
214 /*************************************************************************/
217 * This method tests whether or not this item is a class. Interfaces
218 * do not count as classes.
220 * @return <code>true</code> if this item is a class,
221 * <code>false</code> otherwise.
223 public abstract boolean
226 /*************************************************************************/
229 * This method tests whether or not this item is an ordinary class. An
230 * ordinary class is a class that is not an exception or an error.
231 * Interfaces also do not count because they are not considered classes at
234 * @return <code>true</code> if this item is an ordinary class,
235 * <code>false</code> otherwise.
237 public abstract boolean
240 /*************************************************************************/
243 * This method tests whether or not this item is part of the active set,
246 * @return <code>true</code> if this item is part of the active set,
247 * <code>false</code> otherwise.
249 public abstract boolean
252 /*************************************************************************/
255 * This method returns the location of the item within the Java
258 * @return an object describing the file, line and column where this
261 public abstract SourcePosition