Executable (Java SE 26 & JDK 26)
- All Implemented Interfaces:
AnnotatedElement, GenericDeclaration, Member
- Direct Known Subclasses:
Constructor, Method
-
Field Summary
-
Method Summary
Returns an unmodifiable set of the access flags for the executable represented by this object, possibly empty.
Returns an array of
AnnotatedTypeobjects that represent the use of types to specify the declared exceptions of the method/constructor represented by this Executable.Returns an array of
AnnotatedTypeobjects that represent the use of types to specify formal parameter types of the method/constructor represented by this Executable.Returns an
AnnotatedTypeobject that represents the use of a type to specify the receiver type of the method/constructor represented by thisExecutableobject.Returns an
AnnotatedTypeobject that represents the use of a type to specify the return type of the method/constructor represented by this Executable.getAnnotation(Class<T> annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.
getAnnotationsByType(Class<T> annotationClass) Returns annotations that are associated with this element.
Returns the
Classobject representing the class or interface that declares the executable represented by this object.Returns an array of
Classobjects that represent the types of exceptions declared to be thrown by the underlying executable represented by this object.Returns an array of
Typeobjects that represent the exceptions declared to be thrown by this executable object.Returns an array of
Typeobjects that represent the formal parameter types, in declaration order, of the executable represented by this object.abstract intReturns the Java language modifiers for the executable represented by this object.
getName()Returns the name of the executable represented by this object.
Returns an array of arrays of
Annotations that represent the annotations on the formal parameters, in declaration order, of theExecutablerepresented by this object.abstract intReturns the number of formal parameters (whether explicitly declared or implicitly declared or neither) for the executable represented by this object.
Returns an array of
Parameterobjects representing all the parameters to the underlying executable represented by this object.Returns an array of
Classobjects that represent the formal parameter types, in declaration order, of the executable represented by this object.Returns an array of
TypeVariableobjects that represent the type variables declared by the generic declaration represented by thisGenericDeclarationobject, in declaration order.booleanReturns
trueif this executable is a synthetic construct; returnsfalseotherwise.booleanReturns
trueif this executable was declared to take a variable number of arguments; returnsfalseotherwise.Returns a string describing this
Executable, including any type parameters.Methods declared in class AccessibleObject
canAccess, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAccessible, isAnnotationPresent, setAccessible, setAccessible, trySetAccessiblefinal booleanTest if the caller can access this reflected object.
Returns annotations that are present on this element.
Returns this element's annotation for the specified type if such an annotation is directly present, else null.
Returns annotations that are directly present on this element.
Returns this element's annotation(s) for the specified type if such annotations are either directly present or indirectly present.
booleanbooleanReturns true if an annotation for the specified type is present on this element, else false.
voidSet the
accessibleflag for this reflected object to the indicated boolean value.static voidConvenience method to set the
accessibleflag for an array of reflected objects.final booleanSet the
accessibleflag for this reflected object totrueif possible.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitCreates and returns a copy of this object.
booleanIndicates whether some other object is "equal to" this one.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.intReturns a hash code value for this object.
final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
Returns a string representation of the object.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Method Details
-
getDeclaringClass
-
getName
-
getModifiers
-
accessFlags
-
getTypeParameters
-
getParameterTypes
-
getParameterCount
-
getGenericParameterTypes
-
getParameters
-
getExceptionTypes
-
getGenericExceptionTypes
-
toGenericString
-
isVarArgs
-
isSynthetic
-
getParameterAnnotations
-
getAnnotation
-
getAnnotationsByType
-
getAnnotatedReturnType
-
getAnnotatedReceiverType
-
getAnnotatedParameterTypes
-
getAnnotatedExceptionTypes
-