Package jakarta.enterprise.inject.spi
Interface AnnotatedParameter<X>
- Type Parameters:
X
- the type that declares the method or constructor
- All Superinterfaces:
Annotated
Represents a parameter of a method or constructor.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends Annotation>
Set<T>getAnnotations
(Class<T> annotationType) Get program element annotations of a certain annotation type.Get the declaring method or constructor.default Parameter
Get the underlyingParameter
.int
Get the position of the parameter in the method or constructor argument list.Methods inherited from interface jakarta.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
-
Method Details
-
getPosition
int getPosition()Get the position of the parameter in the method or constructor argument list.
- Returns:
- the position of the parameter
-
getDeclaringCallable
AnnotatedCallable<X> getDeclaringCallable()Get the declaring method or constructor.
- Returns:
- the declaring callable
-
getJavaParameter
Get the underlyingParameter
.- Returns:
- the
Parameter
-
getAnnotations
Description copied from interface:Annotated
Get program element annotations of a certain annotation type.
This method returns back all annotations, including repeatable annotations of this type. The behavior of this method is intended to be the same behavior as
AnnotatedElement.getAnnotationsByType(Class)
, where repeatable annotations are supported.- Specified by:
getAnnotations
in interfaceAnnotated
- Type Parameters:
T
- the type of the annotation- Parameters:
annotationType
- the class of the annotation type- Returns:
- the program element annotations of the given annotation type, or an empty collection
-