public abstract class Executable extends AccessibleObject implements Member, GenericDeclaration
Method
and Constructor
.Modifier and Type | Method | Description |
---|---|---|
AnnotatedType[] |
getAnnotatedExceptionTypes() |
Returns an array of
AnnotatedType objects that represent the use
of types to specify the declared exceptions of the method/constructor
represented by this Executable. |
AnnotatedType[] |
getAnnotatedParameterTypes() |
Returns an array of
AnnotatedType objects that represent the use
of types to specify formal parameter types of the method/constructor
represented by this Executable. |
AnnotatedType |
getAnnotatedReceiverType() |
Returns an
AnnotatedType object that represents the use of a
type to specify the receiver type of the method/constructor represented
by this Executable object. |
abstract AnnotatedType |
getAnnotatedReturnType() |
Returns an
AnnotatedType object that represents the use of a type to
specify the return type of the method/constructor represented by this
Executable. |
<T extends Annotation> |
getAnnotation(Class<T> annotationClass) |
Returns this element's annotation for the specified type if
such an annotation is present, else null.
|
<T extends Annotation> |
getAnnotationsByType(Class<T> annotationClass) |
Returns annotations that are associated with this element.
|
Annotation[] |
getDeclaredAnnotations() |
Returns annotations that are directly present on this element.
|
abstract Class<?> |
getDeclaringClass() |
Returns the
Class object representing the class or interface
that declares the executable represented by this object. |
abstract Class<?>[] |
getExceptionTypes() |
Returns an array of
Class objects that represent the
types of exceptions declared to be thrown by the underlying
executable represented by this object. |
Type[] |
getGenericExceptionTypes() |
Returns an array of
Type objects that represent the
exceptions declared to be thrown by this executable object. |
Type[] |
getGenericParameterTypes() |
Returns an array of
Type objects that represent the formal
parameter types, in declaration order, of the executable represented by
this object. |
abstract int |
getModifiers() |
Returns the Java language modifiers for
the executable represented by this object.
|
abstract String |
getName() |
Returns the name of the executable represented by this object.
|
abstract Annotation[][] |
getParameterAnnotations() |
Returns an array of arrays of
Annotation s that
represent the annotations on the formal parameters, in
declaration order, of the Executable represented by
this object. |
int |
getParameterCount() |
Returns the number of formal parameters (whether explicitly
declared or implicitly declared or neither) for the executable
represented by this object.
|
Parameter[] |
getParameters() |
Returns an array of
Parameter objects that represent
all the parameters to the underlying executable represented by
this object. |
abstract Class<?>[] |
getParameterTypes() |
Returns an array of
Class objects that represent the formal
parameter types, in declaration order, of the executable
represented by this object. |
abstract TypeVariable<?>[] |
|