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. package com.sun.mirror.type;
  8. import com.sun.mirror.declaration.*;
  9. /**
  10. * Represents a class type.
  11. * Interface types are represented separately by {@link InterfaceType}.
  12. * Note that an {@linkplain EnumType enum} is a kind of class.
  13. *
  14. * <p> While a {@link ClassDeclaration} represents the <i>declaration</i>
  15. * of a class, a <tt>ClassType</tt> represents a class <i>type</i>.
  16. * See {@link TypeDeclaration} for more on this distinction.
  17. *
  18. * @author Joseph D. Darcy
  19. * @author Scott Seligman
  20. * @version 1.2 04/04/30
  21. * @since 1.5
  22. */
  23. public interface ClassType extends DeclaredType {
  24. /**
  25. * {@inheritDoc}
  26. */
  27. ClassDeclaration getDeclaration();
  28. /**
  29. * Returns the class type that is a direct supertype of this one.
  30. * This is the superclass of this type's declaring class, with any
  31. * type arguments substituted in.
  32. * The only class with no superclass is <tt>java.lang.Object</tt>,
  33. * for which this method returns <tt>null</tt>.
  34. *
  35. * <p> For example, the class type extended by
  36. * {@code java.util.TreeSet<String>} is
  37. * {@code java.util.AbstractSet<String>}.
  38. *
  39. * @return the class type that is a direct supertype of this one,
  40. * or <tt>null</tt> if there is none
  41. */
  42. ClassType getSuperclass();
  43. }