Module jakarta.cdi

Interface AnnotatedParameter<X>

  • Type Parameters:
    X - the type that declares the method or constructor
    All Superinterfaces:

    public interface AnnotatedParameter<X>
    extends Annotated

    Represents a parameter of a method or constructor.

    Gavin King, Pete Muir, Jozef Hartinger
    • Method Detail

      • getPosition

        int getPosition()

        Get the position of the parameter in the method or constructor argument list.

        the position of the parameter
      • getJavaParameter

        default java.lang.reflect.Parameter getJavaParameter()
        Get the underlying Parameter.
        the Parameter
      • 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 interface Annotated
        Type Parameters:
        T - the type of the annotation
        annotationType - the class of the annotation type
        the program element annotations of the given annotation type, or an empty collection