Interface MutableBeanLocator

All Superinterfaces:
BeanLocator
All Known Implementing Classes:
DefaultBeanLocator

public interface MutableBeanLocator extends BeanLocator
Mutable BeanLocator that finds and tracks bindings across zero or more BindingPublishers.
  • Method Details

    • add

      boolean add(BindingPublisher publisher)
      Adds the given ranked BindingPublisher and distributes its Bindings.
      Parameters:
      publisher - The new publisher
      Returns:
      true if the publisher was added; otherwise false
    • remove

      boolean remove(BindingPublisher publisher)
      Removes the given BindingPublisher and its Bindings.
      Parameters:
      publisher - The old publisher
      Returns:
      true if the publisher was removed; otherwise false
    • publishers

      Iterable<BindingPublisher> publishers()
      Snapshot of currently registered BindingPublishers.
      Returns:
      The registered BindingPublishers
    • clear

      void clear()
      Removes all known BindingPublishers and their Bindings.
    • add

      @Deprecated void add(com.google.inject.Injector injector, int rank)
      Deprecated.
      injectors are normally added automatically, clients should not need to call this method
      Adds the given ranked Injector and distributes its Bindings. Marked as deprecated because most clients should not call this method; any injector with an instance binding to a BeanLocator is automatically added to that locator as part of the bootstrapping process.
      Parameters:
      injector - The new injector
      rank - The assigned rank; should reflect the injector's RankingFunction.maxRank()
    • remove

      @Deprecated void remove(com.google.inject.Injector injector)
      Deprecated.
      Removes the given Injector and its Bindings.
      Parameters:
      injector - The old injector