Interface ParameterDeclaration


@API(status=EXPERIMENTAL, since="5.13") public interface ParameterDeclaration
ParameterDeclaration encapsulates the declaration of an indexed @ParameterizedClass or @ParameterizedTest parameter.
Since:
5.13
See Also:
  • Method Details

    • getAnnotatedElement

      AnnotatedElement getAnnotatedElement()
      Returns the AnnotatedElement that declares the parameter; never null.

      This is either a Parameter or a Field.

      Returns:
      the AnnotatedElement that declares the parameter; never null
    • getParameterType

      Class<?> getParameterType()
      Returns the type of the parameter; never null.
      Returns:
      the type of the parameter; never null
    • getParameterIndex

      int getParameterIndex()
      Returns the index of the parameter.
      Returns:
      the index of the parameter
    • getParameterName

      Optional<String> getParameterName()
      Returns the name of the parameter, if available; never null but potentially empty.
      Returns:
      the name of the parameter, if available; never null but potentially empty