Package | Description |
---|---|
com.google.inject.multibindings |
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar . |
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Multibinder.RealMultibinder<T>
The actual multibinder plays several roles:
|
Modifier and Type | Method and Description |
---|---|
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
java.lang.Class<T> type)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with no binding annotation. |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
java.lang.Class<T> type,
java.lang.annotation.Annotation annotation)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotation . |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
java.lang.Class<T> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotationType . |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
Key<T> key)
Returns a new multibinder that collects instances of the key's type in a
Set that is
itself bound with the annotation (if any) of the key. |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with no binding annotation. |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type,
java.lang.annotation.Annotation annotation)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotation . |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotationType . |
abstract Multibinder<T> |
Multibinder.permitDuplicates()
Configures the bound set to silently discard duplicate elements.
|
Multibinder<T> |
Multibinder.RealMultibinder.permitDuplicates() |
Modifier and Type | Method and Description |
---|---|
private static <K,V> MapBinder.RealMapBinder<K,V> |
MapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
Constructor and Description |
---|
RealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |