Class WatchedBeans<Q extends Annotation,T,W>

java.lang.Object
org.eclipse.sisu.inject.WatchedBeans<Q,T,W>
All Implemented Interfaces:
BindingSubscriber<T>

final class WatchedBeans<Q extends Annotation,T,W> extends Object implements BindingSubscriber<T>
Provides dynamic BeanEntry notifications by tracking qualified Bindings.
See Also:
  • Field Details

  • Constructor Details

    • WatchedBeans

      WatchedBeans(com.google.inject.Key<T> key, Mediator<Q,T,W> mediator, W watcher)
  • Method Details

    • type

      public com.google.inject.TypeLiteral<T> type()
      Description copied from interface: BindingSubscriber
      Returns the type of Bindings that are of interest.
      Specified by:
      type in interface BindingSubscriber<Q extends Annotation>
      Returns:
      The literal type
    • add

      public void add(com.google.inject.Binding<T> binding, int rank)
      Description copied from interface: BindingSubscriber
      Adds the given ranked Binding to this subscriber.
      Specified by:
      add in interface BindingSubscriber<Q extends Annotation>
      Parameters:
      binding - The new binding
      rank - The assigned rank
    • remove

      public void remove(com.google.inject.Binding<T> binding)
      Description copied from interface: BindingSubscriber
      Removes the given Binding from this subscriber.
      Specified by:
      remove in interface BindingSubscriber<Q extends Annotation>
      Parameters:
      binding - The old binding
    • bindings

      public Iterable<com.google.inject.Binding<T>> bindings()
      Description copied from interface: BindingSubscriber
      Snapshot of currently subscribed Bindings.
      Specified by:
      bindings in interface BindingSubscriber<Q extends Annotation>
      Returns:
      The subscribed Bindings
    • detail

      private String detail(Object watcher)