- All Superinterfaces:
AnnotatedElementContext
@API(status=EXPERIMENTAL,
since="5.13")
public interface FieldContext
extends 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 TypeMethodDescriptiongetField()
Returns the field for this context; nevernull
.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; nevernull
.- 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:
-