public interface ExecutableType extends TypeMirror
可执行文件是在被视为一个方法(或构造函数或者初始化)参考型。如果引用类型是参数化的,那么它的实际类型参数将被这个接口的方法所返回的任何类型所取代。
ExecutableElement
Modifier and Type | Method and Description |
---|---|
List<? extends TypeMirror> |
getParameterTypes()
返回此可执行文件的正式参数的类型。
|
TypeMirror |
getReceiverType()
|
TypeMirror |
getReturnType()
返回此可执行文件的返回类型。
|
List<? extends TypeMirror> |
getThrownTypes()
返回异常和该可执行文件的
throws 子句中列出的其他throwables。
|
List<? extends TypeVariable> |
getTypeVariables()
返回由该可执行文件的形式类型参数声明的类型变量。
|
accept, equals, getKind, hashCode, toString
getAnnotation, getAnnotationMirrors, getAnnotationsByType
List<? extends TypeVariable> getTypeVariables()
TypeMirror getReturnType()
List<? extends TypeMirror> getParameterTypes()
TypeMirror getReceiverType()
NoType
种
NONE
如果可执行文件没有接收型。一个可执行的是实例方法或构造函数的内部类,有来自
declaring type接收机类型。可执行文件是一个静态方法或构造函数的一个非内部类,或初始化(静态或实例),没有接收型。
List<? extends TypeMirror> getThrownTypes()
throws
子句中列出的其他throwables。
throws
子句中列出的其他throwables,或一个空的列表,如果没有。
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.