Class WatchedBeans<Q extends java.lang.annotation.Annotation,​T,​W>

    • Constructor Summary

      Constructors 
      Constructor Description
      WatchedBeans​(com.google.inject.Key<T> key, Mediator<Q,​T,​W> mediator, W watcher)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(com.google.inject.Binding<T> binding, int rank)
      Adds the given ranked Binding to this subscriber.
      java.lang.Iterable<com.google.inject.Binding<T>> bindings()
      Snapshot of currently subscribed Bindings.
      private java.lang.String detail​(java.lang.Object watcher)  
      void remove​(com.google.inject.Binding<T> binding)
      Removes the given Binding from this subscriber.
      com.google.inject.TypeLiteral<T> type()
      Returns the type of Bindings that are of interest.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • beans

        private final BeanCache<Q extends java.lang.annotation.Annotation,​T> beans
      • key

        private final com.google.inject.Key<T> key
      • mediator

        private final Mediator<Q extends java.lang.annotation.Annotation,​T,​W> mediator
      • watcherRef

        private final java.lang.ref.Reference<W> watcherRef
    • Constructor Detail

      • WatchedBeans

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

      • 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 java.lang.annotation.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 java.lang.annotation.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 java.lang.annotation.Annotation>
        Parameters:
        binding - The old binding
      • bindings

        public java.lang.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 java.lang.annotation.Annotation>
        Returns:
        The subscribed Bindings
      • detail

        private java.lang.String detail​(java.lang.Object watcher)