Class IdentifiedComponentManager<T extends IdentifiedComponent>

Type Parameters:
T - descriptor type

public class IdentifiedComponentManager<T extends IdentifiedComponent> extends Object
Class used for auto-wiring free-standing identified objects along with explicitly declared bean collections.

This class marries old-style "explicit" list-based configuration of a collection of objects with annotation-driven discovery of objects of the same type.

Specializations of this class are expected to fix the type and add an Autowired constructor to receive the free-standing objects.

  • Field Details

  • Constructor Details

    • IdentifiedComponentManager

      public IdentifiedComponentManager(@Nullable @NonnullElements Collection<T> freeObjects)
      Auto-wiring point for free-standing objects.
      freeObjects - free-standing objects
  • Method Details

    • setComponents

      public void setComponents(@Nullable @NonnullElements Collection<T> additionalObjects)
      Sets additional non-autowired components to merge in.

      For now, this set is prepended to any auto-wired objects and any auto-wired objects are excluded if they have the same identifier as an explicitly injected object.

      additionalObjects - additional objects
    • getComponents

      @Nonnull @NonnullElements public Collection<T> getComponents()
      Gets the final collection of merged components.
      merged components