public interface DeclaredType extends ReferenceType
java.util.Set<String>以及原始类型。
而TypeElement表示类或接口要素,一DeclaredType表示类或接口类型,后者被使用(或调用)的前。看到更多关于这个区别TypeElement。
的超类型(包括类和接口类型)的声明的类型可以使用Types.directSupertypes(TypeMirror)法。返回类型与任何类型参数替换。
TypeElement
| Modifier and Type | Method and Description |
|---|---|
Element |
asElement()
返回对应于该类型的元素。
|
TypeMirror |
getEnclosingType()
返回内心封闭实例或
NoType种
NONE类型如果没有封闭实例。
|
List<? extends TypeMirror> |
getTypeArguments()
返回此类型的实际类型参数。
|
accept, equals, getKind, hashCode, toStringgetAnnotation, getAnnotationMirrors, getAnnotationsByTypeElement asElement()
TypeMirror getEnclosingType()
NoType种
NONE类型如果没有封闭实例。仅对应于内部类的唯一类型有一个封闭实例。
List<? extends TypeMirror> getTypeArguments()
Outer<String>.Inner<Number>),只有最内层的类型的类型参数包括。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.