Package org.eclipse.sisu.inject
Class WatchedBeans<Q extends java.lang.annotation.Annotation,T,W>
- java.lang.Object
-
- org.eclipse.sisu.inject.WatchedBeans<Q,T,W>
-
- All Implemented Interfaces:
BindingSubscriber<T>
final class WatchedBeans<Q extends java.lang.annotation.Annotation,T,W> extends java.lang.Object implements BindingSubscriber<T>
Provides dynamicBeanEntrynotifications by tracking qualifiedBindings.- See Also:
BeanLocator.watch(Key, Mediator, Object)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(com.google.inject.Binding<T> binding, int rank)Adds the given rankedBindingto this subscriber.java.lang.Iterable<com.google.inject.Binding<T>>bindings()Snapshot of currently subscribedBindings.private java.lang.Stringdetail(java.lang.Object watcher)voidremove(com.google.inject.Binding<T> binding)Removes the givenBindingfrom this subscriber.com.google.inject.TypeLiteral<T>type()Returns the type ofBindings that are of interest.
-
-
-
Field Detail
-
key
private final com.google.inject.Key<T> key
-
strategy
private final QualifyingStrategy strategy
-
watcherRef
private final java.lang.ref.Reference<W> watcherRef
-
-
Method Detail
-
type
public com.google.inject.TypeLiteral<T> type()
Description copied from interface:BindingSubscriberReturns the type ofBindings that are of interest.- Specified by:
typein interfaceBindingSubscriber<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:BindingSubscriberAdds the given rankedBindingto this subscriber.- Specified by:
addin interfaceBindingSubscriber<Q extends java.lang.annotation.Annotation>- Parameters:
binding- The new bindingrank- The assigned rank
-
remove
public void remove(com.google.inject.Binding<T> binding)
Description copied from interface:BindingSubscriberRemoves the givenBindingfrom this subscriber.- Specified by:
removein interfaceBindingSubscriber<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:BindingSubscriberSnapshot of currently subscribedBindings.- Specified by:
bindingsin interfaceBindingSubscriber<Q extends java.lang.annotation.Annotation>- Returns:
- The subscribed
Bindings
-
detail
private java.lang.String detail(java.lang.Object watcher)
-
-