java.util.Set<String>
as well as raw types.
While a TypeElement represents a class or interface
element, a DeclaredType represents a class
or interface type, the latter being a use
(or invocation) of the former.
See TypeElement for more on this distinction.
The supertypes (both class and interface types) of a declared
type may be found using the Types#directSupertypes(TypeMirror) method. This returns the
supertypes with any type arguments substituted in.
TypeElement
| Modifier and Type | Method and Description |
|---|---|
| public Element | Returns: the element corresponding to this typeReturns the element corresponding to this type. |
| public TypeMirror | Returns: a type mirror for the enclosing typeReturns the type of the innermost enclosing instance or a
|
| public List | Returns: the actual type arguments of this type, or an empty list if noneReturns the actual type arguments of this type. |
| asElement | back to summary |
|---|---|
| public Element asElement() Returns the element corresponding to this type.
| |
| getEnclosingType | back to summary |
|---|---|
| public TypeMirror getEnclosingType() Returns the type of the innermost enclosing instance or a
| |
| getTypeArguments | back to summary |
|---|---|
| public List Returns the actual type arguments of this type.
For a type nested within a parameterized type
(such as
| |