Top Description Methods
org.junit.jupiter.params.support

public Interface FieldContext

extends AnnotatedElementContext
Known Direct Implementers
org.junit.jupiter.params.ResolverFacade.FieldParameterDeclaration
Annotations
@API
status:EXPERIMENTAL
since:6.0
Static Imports
org.apiguardian.api.API.Status.EXPERIMENTAL

FieldContext encapsulates the context in which an @Parameter-annotated Field is declared in a @ParameterizedClass.
Since
5.13
See Also
ParameterizedClass, Parameter

Method Summary

Modifier and TypeMethod and Description
public Field

Returns:

the field for this context; never null
getField
()

Returns the field for this context; never null.

public int

Returns:

the index of the parameter
getParameterIndex
()

Returns the index of the parameter.

Inherited from org.junit.jupiter.api.extension.AnnotatedElementContext:
findAnnotationfindRepeatableAnnotationsgetAnnotatedElementisAnnotated

Method Detail

getFieldback to summary
public Field getField()

Returns the field for this context; never null.

Returns:Field

the field for this context; never null

getParameterIndexback to summary
public 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:int

the index of the parameter

See Also
Parameter#value()