public class AnnotationAwareOrderComparator extends OrderComparator
Comparator implementation that checks
Ordered as well as the
Order annotation, with an order value provided by an
Ordered instance overriding a statically defined
annotation value (if any).| Modifier and Type | Field and Description |
|---|---|
static AnnotationAwareOrderComparator |
INSTANCE
Shared default instance of AnnotationAwareOrderComparator.
|
| Constructor and Description |
|---|
AnnotationAwareOrderComparator() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
getOrder(Object obj)
Determine the order value for the given object.
|
compare, sort, sortclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic static AnnotationAwareOrderComparator INSTANCE
protected int getOrder(Object obj)
OrderComparatorThe default implementation checks against the Ordered
interface. Can be overridden in subclasses.
getOrder in class OrderComparatorobj - the object to checkOrdered.LOWEST_PRECEDENCE as fallback