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.