private class DefaultListableBeanFactory.FactoryAwareOrderSourceProvider extends java.lang.Object implements OrderComparator.OrderSourceProvider
OrderComparator.OrderSourceProvider
implementation
that is aware of the bean metadata of the instances to sort.
Lookup for the method factory of an instance to sort, if any, and let the
comparator retrieve the Order
value defined on it. This essentially allows for the following construct:
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Object,java.lang.String> |
instancesToBeanNames |
Constructor and Description |
---|
FactoryAwareOrderSourceProvider(java.util.Map<java.lang.Object,java.lang.String> instancesToBeanNames) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getOrderSource(java.lang.Object obj)
Return an order source for the specified object, i.e.
|
private RootBeanDefinition |
getRootBeanDefinition(java.lang.String beanName) |
private final java.util.Map<java.lang.Object,java.lang.String> instancesToBeanNames
public FactoryAwareOrderSourceProvider(java.util.Map<java.lang.Object,java.lang.String> instancesToBeanNames)
public java.lang.Object getOrderSource(java.lang.Object obj)
OrderComparator.OrderSourceProvider
Can also be an array of order source objects.
If the returned object does not indicate any order, the comparator will fall back to checking the original object.
getOrderSource
in interface OrderComparator.OrderSourceProvider
obj
- the object to find an order source fornull
if none foundprivate RootBeanDefinition getRootBeanDefinition(java.lang.String beanName)