一、Constructor与Method的父类:Executable
Executable表示一个可执行类,构造方法与普通方法都是Executable
AnnotatedType[]
getAnnotatedExceptionTypes()
AnnotatedType[]
getAnnotatedParameterTypes()
AnnotatedType
getAnnotatedReceiverType()
abstract AnnotatedType
getAnnotatedReturnType()
T
getAnnotation(Class annotationClass)
T[]
getAnnotationsByType(Class annotationClass)
Annotation[]
getDeclaredAnnotations()
abstract Class>
getDeclaringClass()
返回Class 对象,该对象表示声明由此Executable对象表示的类。
abstract Class>[]
getExceptionTypes()
返回一组表示声明要抛出的异常类型的Class 对象,这些异常是由此Executable对象表示的底层方法抛出的。
Type[]
getGenericExceptionTypes()
返回一组 Type 对象,这些对象表示声明要由此Executable对象抛出的异常。
Type[]
getGenericParameterTypes()
按照声明顺序返回一组 Type 对象,这些对象表示此Executable对象所表示的方法的形参类型。
abstract int
getModifiers()
以整数形式返回此Executable对象所表示构造方法的 Java 语言修饰符。
abstract String
getName()
以字符串形式返回此构造方法的名称。
abstract Annotation[][]
getParameterAnnotations()
按照声明顺序返回一组数组,这些数组表示通过此Executable对象表示的方法的形参上的注释。
int
getParameterCount()
返回参数数量
Parameter[]
getParameters()
返回该Executable对象上所有的参数对象
abstract Class>[]
getParameterTypes()
按照声明顺序返回一组Class对象,这些对象表示此Executable对象所表示构造方法的形参类型。
abstract TypeVariable>[]
getTypeParameters()
按照声明顺序返回一组 TypeVariable 对象,这些对象表示通过此 GenericDeclaration 对象所表示的一般声明来声明的类型变量。
boolean
isSynthetic()
如果此Executable是一个复合方法,则返回 true;否则返回 false。
boolean
isVarArgs()
如果声明此构造方法可以带可变数量的参数,则返回 true;否则返回 false。
abstract String
toGenericString()
返回描述此Executable的字符串,其中包括类型参数。
二、Constructor
Constructor
boolean
equals(Object obj)
AnnotatedT