Top Description Fields Methods
org.junit.jupiter.params

public @Interface Parameter

extends Annotation
Annotations
@Retention:RUNTIME
@Target:ANNOTATION_TYPE, FIELD
@Documented
@API
status:EXPERIMENTAL
since:6.0
Static Imports
org.apiguardian.api.API.Status.EXPERIMENTAL

@Parameter is used to signal that a field in a @ParameterizedClass constitutes a parameter and marks it for field injection.

@Parameter may also be used as a meta-annotation in order to create a custom composed annotation that inherits the semantics of @Parameter.

Since
5.13
See Also
ParameterizedClass, ArgumentsAccessor, AggregateWith, org.junit.jupiter.params.converter.ArgumentConverter, org.junit.jupiter.params.converter.ConvertWith

Field Summary

Modifier and TypeField and Description
public static final int
UNSET_INDEX

Constant that indicates that the index of the parameter is unset.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the index of the parameter in the list of parameters
value
()

Returns the index of the parameter in the list of parameters.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Field Detail

UNSET_INDEXback to summary
public static final int UNSET_INDEX

Constant that indicates that the index of the parameter is unset.

Method Detail

valueback to summary
public int value()

Returns the index of the parameter in the list of parameters.

Must be -1 (the default) for aggregators, that is any field of type ArgumentsAccessor or any field annotated with @AggregateWith.

May be omitted if there's a single indexed parameter. Otherwise, must be unique among all indexed parameters of the parameterized class and its superclasses.

Returns:int

the index of the parameter in the list of parameters