1 /* 2 * @(#)ClassType.java 1.2 04/04/30 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package com.sun.mirror.type; 9 10 11 import com.sun.mirror.declaration.*; 12 13 14 /** 15 * Represents a class type. 16 * Interface types are represented separately by {@link InterfaceType}. 17 * Note that an {@linkplain EnumType enum} is a kind of class. 18 * 19 * <p> While a {@link ClassDeclaration} represents the <i>declaration</i> 20 * of a class, a <tt>ClassType</tt> represents a class <i>type</i>. 21 * See {@link TypeDeclaration} for more on this distinction. 22 * 23 * @author Joseph D. Darcy 24 * @author Scott Seligman 25 * @version 1.2 04/04/30 26 * @since 1.5 27 */ 28 29 public interface ClassType extends DeclaredType { 30 31 /** 32 * {@inheritDoc} 33 */ 34 ClassDeclaration getDeclaration(); 35 36 /** 37 * Returns the class type that is a direct supertype of this one. 38 * This is the superclass of this type's declaring class, with any 39 * type arguments substituted in. 40 * The only class with no superclass is <tt>java.lang.Object</tt>, 41 * for which this method returns <tt>null</tt>. 42 * 43 * <p> For example, the class type extended by 44 * {@code java.util.TreeSet<String>} is 45 * {@code java.util.AbstractSet<String>}. 46 * 47 * @return the class type that is a direct supertype of this one, 48 * or <tt>null</tt> if there is none 49 */ 50 ClassType getSuperclass(); 51 } 52