001    package org.junit.runner;
002    
003    import java.lang.annotation.ElementType;
004    import java.lang.annotation.Inherited;
005    import java.lang.annotation.Retention;
006    import java.lang.annotation.RetentionPolicy;
007    import java.lang.annotation.Target;
008    
009    import org.junit.runner.manipulation.Ordering;
010    import 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)
023    public @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    }