001package org.junit.runner;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Inherited;
005import java.lang.annotation.Retention;
006import java.lang.annotation.RetentionPolicy;
007import java.lang.annotation.Target;
008
009import org.junit.runner.manipulation.Ordering;
010import org.junit.validator.ValidateWith;
011
012/**
013 * When a test class is annotated with <code>&#064;OrderWith</code> or extends a class annotated
014 * with <code>&#064;OrderWith</code>, JUnit will order the tests in the test class (and child
015 * test classes, if any) using the ordering defined by the {@link Ordering} class.
016 *
017 * @since 4.13
018 */
019@Retention(RetentionPolicy.RUNTIME)
020@Target(ElementType.TYPE)
021@Inherited
022@ValidateWith(OrderWithValidator.class)
023public @interface OrderWith {
024    /**
025     * Gets a class that extends {@link Ordering}. The class must have a public no-arg constructor.
026     */
027    Class<? extends Ordering.Factory> value();
028}