Package org.eclipse.sisu.inject
Class RankedBindings<T>
java.lang.Object
org.eclipse.sisu.inject.RankedBindings<T>
- All Implemented Interfaces:
Iterable<com.google.inject.Binding<T>>,BindingSubscriber<T>
final class RankedBindings<T>
extends Object
implements Iterable<com.google.inject.Binding<T>>, BindingSubscriber<T>
Ordered sequence of
Bindings of a given type; subscribes to BindingPublishers on demand.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final classBindingiterator that only subscribes toBindingPublishers as required. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final RankedSequence<com.google.inject.Binding<T>> (package private) final Collection<BeanCache<?, T>> (package private) final RankedSequence<BindingPublisher> (package private) final com.google.inject.TypeLiteral<T> -
Constructor Summary
ConstructorsConstructorDescriptionRankedBindings(com.google.inject.TypeLiteral<T> type, RankedSequence<BindingPublisher> publishers) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given rankedBindingto this subscriber.(package private) voidadd(BindingPublisher publisher, int rank) bindings()Snapshot of currently subscribedBindings.iterator()(package private) <Q extends Annotation>
BeanCache<Q, T> voidRemoves the givenBindingfrom this subscriber.(package private) voidremove(BindingPublisher publisher) com.google.inject.TypeLiteral<T> type()Returns the type ofBindings that are of interest.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
bindings
-
type
-
pendingPublishers
-
cachedBeans
-
-
Constructor Details
-
RankedBindings
RankedBindings(com.google.inject.TypeLiteral<T> type, RankedSequence<BindingPublisher> publishers)
-
-
Method Details
-
type
Description copied from interface:BindingSubscriberReturns the type ofBindings that are of interest.- Specified by:
typein interfaceBindingSubscriber<T>- Returns:
- The literal type
-
add
Description copied from interface:BindingSubscriberAdds the given rankedBindingto this subscriber.- Specified by:
addin interfaceBindingSubscriber<T>- Parameters:
binding- The new bindingrank- The assigned rank
-
remove
Description copied from interface:BindingSubscriberRemoves the givenBindingfrom this subscriber.- Specified by:
removein interfaceBindingSubscriber<T>- Parameters:
binding- The old binding
-
bindings
Description copied from interface:BindingSubscriberSnapshot of currently subscribedBindings.- Specified by:
bindingsin interfaceBindingSubscriber<T>- Returns:
- The subscribed
Bindings
-
iterator
-
newBeanCache
-
add
-
remove
-