Interface BeanLocator

  • All Known Subinterfaces:
    MutableBeanLocator
    All Known Implementing Classes:
    DefaultBeanLocator

    public interface BeanLocator
    Finds and tracks bean implementations annotated with Qualifier annotations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <Q extends Annotation,​T>
      Iterable<? extends BeanEntry<Q,​T>>
      locate​(com.google.inject.Key<T> key)
      Finds bean implementations that match the given qualified binding Key.
      <Q extends Annotation,​T,​W>
      void
      watch​(com.google.inject.Key<T> key, Mediator<Q,​T,​W> mediator, W watcher)
      Tracks bean implementations that match the given qualified binding Key.
    • Method Detail

      • locate

        <Q extends Annotation,​T> Iterable<? extends BeanEntry<Q,​T>> locate​(com.google.inject.Key<T> key)
        Finds bean implementations that match the given qualified binding Key.
        Parameters:
        key - The qualified key
        Returns:
        Sequence of bean entries that match the given key
      • watch

        <Q extends Annotation,​T,​W> void watch​(com.google.inject.Key<T> key,
                                                          Mediator<Q,​T,​W> mediator,
                                                          W watcher)
        Tracks bean implementations that match the given qualified binding Key.

        Uses the Mediator pattern to send events to an arbitrary watcher object.

        Parameters:
        key - The qualified key
        mediator - The event mediator
        watcher - The bean watcher