@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
@Documented
@API(status=EXPERIMENTAL,
since="5.4")
public @interface Order
@Order
is an annotation that is used to configure the
order in which the annotated element (i.e., field or
method) should be evaluated or executed relative to other elements of the
same category.
When used with
@RegisterExtension
,
the category applies to extension fields. When used with the
MethodOrderer.OrderAnnotation
MethodOrderer
, the category applies to
test methods.
If @Order
is not explicitly declared on an element, the default
order value assigned to the element is Integer.MAX_VALUE
.
MethodOrderer.OrderAnnotation
,
@RegisterExtension
Modifier and Type | Required Element and Description |
---|---|
int |
value
The order value for the annotated element (i.e., field or method).
|