FactoryAwareOrderSourceProvider class final
An OrderSourceProvider implementation that is aware of the container’s
DefaultListablePodFactory.
This provider bridges between pod definitions and the ordering system used by dependency resolution, sorting, and prioritization (e.g. in autowiring or lifecycle processing).
Behavior
- Maintains a map of object → pod name (podNames).
— When asked for the order of a given
obj, it resolves the pod definition from the factory. - If the pod’s design metadata specifies an
order, wraps it in a_SimplyOrderedand returns it. - If no mapping or order is found, returns
null.
Use Cases
- Allows container-managed objects to participate in ordered resolution.
- Supports ordered-like semantics by tying the order back to pod metadata rather than the raw object itself.
Parameters
- factory: The backing DefaultListablePodFactory for definition lookups.
- podNames: A mapping of object instances to their logical pod names.
Notes
- Only provides order information for pods that are known in podNames.
- This is typically wired into the container’s dependency comparator logic.
Constructors
-
FactoryAwareOrderSourceProvider(DefaultListablePodFactory factory, Map<
Object, String> podNames) -
An
OrderSourceProviderimplementation that is aware of the container’s DefaultListablePodFactory.
Properties
- factory → DefaultListablePodFactory
-
The factory to use for definition lookups.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
podNames
→ Map<
Object, String> -
The mapping of object instances to their logical pod names.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getOrderSource(
Object obj) → Object? - A strategy interface for providing an alternative source of order metadata for a given object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited