Package jakarta.enterprise.inject.spi
Interface AnnotatedType<X>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T extends Annotation>
Set<T>getAnnotations(Class<T> annotationType)
Get program element annotations of a certain annotation type.Set<AnnotatedConstructor<X>>
getConstructors()
Get the constructors of the type.Set<AnnotatedField<? super X>>
getFields()
Get the fields of the type.Class<X>
getJavaClass()
Get the underlyingClass
.Set<AnnotatedMethod<? super X>>
getMethods()
Get the methods of the type.-
Methods inherited from interface jakarta.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
-
-
-
-
Method Detail
-
getConstructors
Set<AnnotatedConstructor<X>> getConstructors()
Get the constructors of the type. If an empty set is returned, a default constructor with no parameters will be assumed.
- Returns:
- the constructors, or an empty set if none are defined
-
getMethods
Set<AnnotatedMethod<? super X>> getMethods()
Get the methods of the type.
- Returns:
- the methods, or an empty set if none are defined
-
getFields
Set<AnnotatedField<? super X>> getFields()
Get the fields of the type.
- Returns:
- the fields, or an empty set if none are defined
-
getAnnotations
default <T extends Annotation> Set<T> getAnnotations(Class<T> annotationType)
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
-
-