public class

AnnotationAwareOrderComparator

extends OrderComparator
java.lang.Object
   ↳ org.springframework.core.OrderComparator
     ↳ org.springframework.core.annotation.AnnotationAwareOrderComparator

Class Overview

java.util.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).

See Also

Summary

[Expand]
Inherited Fields
From class org.springframework.core.OrderComparator
Public Constructors
AnnotationAwareOrderComparator()
Protected Methods
int getOrder(Object obj)
Determine the order value for the given object.
[Expand]
Inherited Methods
From class org.springframework.core.OrderComparator
From class java.lang.Object
From interface java.util.Comparator

Public Constructors

public AnnotationAwareOrderComparator ()

Also: SpringCore

Protected Methods

protected int getOrder (Object obj)

Also: SpringCore

Determine the order value for the given object.

The default implementation checks against the Ordered interface. Can be overridden in subclasses.

Parameters
obj the object to check
Returns
  • the order value, or Ordered.LOWEST_PRECEDENCE as fallback