public static class ClassOrderer.OrderAnnotation extends java.lang.Object implements ClassOrderer
ClassOrderer that sorts classes based on the @Order
annotation.
Any classes that are assigned the same order value will be sorted arbitrarily adjacent to each other.
Any classes 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 classes are assigned
an explicit order value greater than the default order value. Any classes
assigned an explicit order value greater than the default order value will
appear after non-annotated classes in the sorted list.
ClassOrderer.ClassName, ClassOrderer.DisplayName, ClassOrderer.OrderAnnotation, ClassOrderer.RandomDEFAULT_ORDER_PROPERTY_NAME| Constructor and Description |
|---|
OrderAnnotation() |
| Modifier and Type | Method and Description |
|---|---|
private static int |
getOrder(ClassDescriptor descriptor) |
void |
orderClasses(ClassOrdererContext context)
Sort the classes encapsulated in the supplied
ClassOrdererContext based on the @Order
annotation. |
public void orderClasses(ClassOrdererContext context)
ClassOrdererContext based on the @Order
annotation.orderClasses in interface ClassOrderercontext - the ClassOrdererContext containing the
class descriptors to order; never nullprivate static int getOrder(ClassDescriptor descriptor)