| 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 |
MapBinder.RealMapBinder<K,V>
The actual mapbinder plays several roles:
|
| Modifier and Type | Method and Description |
|---|---|
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Returns a new mapbinder that collects entries of
keyType/valueType in a
Map that is itself bound with no binding annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType,
java.lang.annotation.Annotation annotation)
Returns a new mapbinder that collects entries of
keyType/valueType in a
Map that is itself bound with annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new mapbinder that collects entries of
keyType/valueType in a
Map that is itself bound with annotationType. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries of
keyType/valueType in a
Map that is itself bound with no binding annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
java.lang.annotation.Annotation annotation)
Returns a new mapbinder that collects entries of
keyType/valueType in a
Map that is itself bound with annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new mapbinder that collects entries of
keyType/valueType in a
Map that is itself bound with annotationType. |
abstract MapBinder<K,V> |
MapBinder.permitDuplicates()
Configures the
MapBinder to handle duplicate entries. |
MapBinder<K,V> |
MapBinder.RealMapBinder.permitDuplicates() |