Package com.sun.mirror.type
Interface ClassType
-
- All Superinterfaces:
DeclaredType,ReferenceType,TypeMirror
- All Known Subinterfaces:
EnumType
public interface ClassType extends DeclaredType
Represents a class type. Interface types are represented separately byInterfaceType. Note that an enum is a kind of class.While a
ClassDeclarationrepresents the declaration of a class, aClassTyperepresents a class type. SeeTypeDeclarationfor more on this distinction.- Since:
- 1.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassDeclarationgetDeclaration()Returns the declaration of this type.ClassTypegetSuperclass()Returns the class type that is a direct supertype of this one.-
Methods inherited from interface com.sun.mirror.type.DeclaredType
getActualTypeArguments, getContainingType, getSuperinterfaces
-
Methods inherited from interface com.sun.mirror.type.TypeMirror
accept, equals, toString
-
-
-
-
Method Detail
-
getDeclaration
ClassDeclaration getDeclaration()
Returns the declaration of this type.Returns null if this type's declaration is unknown. This may be the result of a processing error, such as a missing class file.
- Specified by:
getDeclarationin interfaceDeclaredType- Returns:
- the declaration of this type, or null if unknown
-
getSuperclass
ClassType getSuperclass()
Returns the class type that is a direct supertype of this one. This is the superclass of this type's declaring class, with any type arguments substituted in. The only class with no superclass isjava.lang.Object, for which this method returnsnull.For example, the class type extended by
java.util.TreeSet<String>isjava.util.AbstractSet<String>.- Returns:
- the class type that is a direct supertype of this one,
or
nullif there is none
-
-