Interface FieldContext

All Superinterfaces:
org.junit.jupiter.api.extension.AnnotatedElementContext

@API(status=MAINTAINED, since="5.13.3") public interface FieldContext extends org.junit.jupiter.api.extension.AnnotatedElementContext
FieldContext encapsulates the context in which an @Parameter-annotated Field is declared in a @ParameterizedClass.
Since:
5.13
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the field for this context; never null.
    int
    Returns the index of the parameter.

    Methods inherited from interface org.junit.jupiter.api.extension.AnnotatedElementContext

    findAnnotation, findRepeatableAnnotations, getAnnotatedElement, isAnnotated
  • Method Details

    • getField

      Field getField()
      Returns the field for this context; never null.
      Returns:
      the field for this context; never null
    • getParameterIndex

      int getParameterIndex()
      Returns the index of the parameter.

      This method returns -1 for aggregator fields and a value greater than or equal to zero for indexed parameters.

      Returns:
      the index of the parameter
      See Also: