public static class MethodOrderer.OrderAnnotation extends java.lang.Object implements MethodOrderer
MethodOrderer that sorts methods based on the @Order
annotation.
Any methods that are assigned the same order value will be sorted arbitrarily adjacent to each other.
Any methods not annotated with @Order will be assigned the
default order value which will effectively cause them
to appear at the end of the sorted list, unless certain methods are assigned
an explicit order value greater than the default order value. Any methods
assigned an explicit order value greater than the default order value will
appear after non-annotated methods in the sorted list.
MethodOrderer.Alphanumeric, MethodOrderer.DisplayName, MethodOrderer.MethodName, MethodOrderer.OrderAnnotation, MethodOrderer.RandomDEFAULT_ORDER_PROPERTY_NAME| Constructor and Description |
|---|
OrderAnnotation() |
| Modifier and Type | Method and Description |
|---|---|
private static int |
getOrder(MethodDescriptor descriptor) |
void |
orderMethods(MethodOrdererContext context)
Sort the methods encapsulated in the supplied
MethodOrdererContext based on the @Order
annotation. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultExecutionModepublic void orderMethods(MethodOrdererContext context)
MethodOrdererContext based on the @Order
annotation.orderMethods in interface MethodOrderercontext - the MethodOrdererContext containing the
method descriptors to order; never nullMethodOrderer.getDefaultExecutionMode()private static int getOrder(MethodDescriptor descriptor)