Tue, 16 Sep 2008 18:35:18 -0700
6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
Reviewed-by: darcy, mcimadamore
1 /*
2 * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
26 package com.sun.mirror.declaration;
29 import java.util.Collection;
31 import com.sun.mirror.type.ClassType;
34 /**
35 * Represents the declaration of a class.
36 * For the declaration of an interface, see {@link InterfaceDeclaration}.
37 * Provides access to information about the class, its members, and
38 * its constructors.
39 * Note that an {@linkplain EnumDeclaration enum} is a kind of class.
40 *
41 * <p> While a <tt>ClassDeclaration</tt> represents the <i>declaration</i>
42 * of a class, a {@link ClassType} represents a class <i>type</i>.
43 * See {@link TypeDeclaration} for more on this distinction.
44 *
45 * <p> {@link com.sun.mirror.util.DeclarationFilter}
46 * provides a simple way to select just the items of interest
47 * when a method returns a collection of declarations.
48 *
49 * @author Joseph D. Darcy
50 * @author Scott Seligman
51 *
52 * @see ClassType
53 * @since 1.5
54 */
56 public interface ClassDeclaration extends TypeDeclaration {
58 /**
59 * Returns the class type directly extended by this class.
60 * The only class with no superclass is <tt>java.lang.Object</tt>,
61 * for which this method returns null.
62 *
63 * @return the class type directly extended by this class, or null
64 * if there is none
65 */
66 ClassType getSuperclass();
68 /**
69 * Returns the constructors of this class.
70 * This includes the default constructor if this class has
71 * no constructors explicitly declared.
72 *
73 * @return the constructors of this class
74 *
75 * @see com.sun.mirror.util.DeclarationFilter
76 */
77 Collection<ConstructorDeclaration> getConstructors();
79 /**
80 * {@inheritDoc}
81 */
82 Collection<MethodDeclaration> getMethods();
83 }