-
- Type Parameters:
X
- the declaring class
- All Superinterfaces:
Annotated
,AnnotatedCallable<X>
,AnnotatedMember<X>
public interface AnnotatedConstructor<X> extends AnnotatedCallable<X>
Represents a constructor of a Java class.
- Author:
- Gavin King, Pete Muir
- See Also:
Constructor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T extends java.lang.annotation.Annotation>
java.util.Set<T>getAnnotations(java.lang.Class<T> annotationType)
Get program element annotations of a certain annotation type.java.lang.reflect.Constructor<X>
getJavaMember()
Get the underlyingConstructor
.-
Methods inherited from interface jakarta.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
-
Methods inherited from interface jakarta.enterprise.inject.spi.AnnotatedCallable
getParameters
-
Methods inherited from interface jakarta.enterprise.inject.spi.AnnotatedMember
getDeclaringType, isStatic
-
-
-
-
Method Detail
-
getJavaMember
java.lang.reflect.Constructor<X> getJavaMember()
Get the underlying
Constructor
.- Specified by:
getJavaMember
in interfaceAnnotatedMember<X>
- Returns:
- the constructor
-
getAnnotations
default <T extends java.lang.annotation.Annotation> java.util.Set<T> getAnnotations(java.lang.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
-
-