-  
       
- All Superinterfaces:
 -  
         
AnnotatedConstruct,ReferenceType,TypeMirror 
- All Known Subinterfaces:
 -  
         
ErrorType 
public interface DeclaredType extends ReferenceType
表示声明的类型,类类型或接口类型。 这包括参数化类型,如java.util.Set<String>以及原始类型。TypeElement表示类或接口元素 ,而DeclaredType表示类或接口类型 ,后者是前者的使用(或调用 )。 有关此区别的更多信息,请参见TypeElement。可以使用
Types.directSupertypes(TypeMirror)方法找到声明类型的超类型(类和接口类型)。 这将返回替换为任何类型参数的超类型。- 从以下版本开始:
 - 1.6
 - 另请参见:
 -  
         
TypeElement 
 
-  
        
       
-  
             
方法摘要
所有方法 实例方法 抽象方法 变量和类型 方法 描述 ElementasElement()返回与此类型对应的元素。TypeMirrorgetEnclosingType()如果没有封闭实例,则返回最内层封闭实例的类型或类型为NoType的NONE。List<? extends TypeMirror>getTypeArguments()返回此类型的实际类型参数。-  
               
声明方法的接口 javax.lang.model.AnnotatedConstruct
getAnnotation, getAnnotationMirrors, getAnnotationsByType 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
方法详细信息
-  
asElement
Element asElement()
返回与此类型对应的元素。- 结果
 - 与此类型对应的元素
 
 
-  
getEnclosingType
TypeMirror getEnclosingType()
如果没有封闭实例,则返回最内层封闭实例的类型或NoType类型NONE。 只有与内部类对应的类型才有封闭实例。- 结果
 - 封闭类型的类型镜像
 - See The Java™ Language Specification:
 - 8.1.3内部类和封闭实例,15.9.2确定封闭实例
 
 
-  
getTypeArguments
List<? extends TypeMirror> getTypeArguments()
返回此类型的实际类型参数。 对于嵌套在参数化类型(例如Outer<String>.Inner<Number>)中的类型,仅包括最内层类型的类型参数。- 结果
 - 此类型的实际类型参数,如果没有,则为空列表
 
 
 -  
 
 -