Package io.bootique.di
Interface MapBuilder<K,V>
- Type Parameters:
K- A type of the map keys.V- A type of the map values.
- All Superinterfaces:
ScopeBuilder
A binding builder for map configurations. Creates a parameterized map of type <K, V>.
- Since:
- 2.0.M1
-
Method Summary
Modifier and TypeMethodDescriptionMapBuilder<K,V> MapBuilder<K,V> default MapBuilder<K,V> Deprecated.default MapBuilder<K,V> Deprecated.since 2.0.B1 in favor ofputInstances(Map)to avoid ambiguityMapBuilder<K,V> putInstance(K key, V value) MapBuilder<K,V> putInstances(Map<K, V> map) MapBuilder<K,V> putProvider(K key, Class<? extends javax.inject.Provider<? extends V>> value) default MapBuilder<K,V> putProvider(K key, javax.inject.Provider<? extends V> value) Deprecated.since 2.0.B1 in favor ofputProviderInstance(Object, Provider)to avoid ambiguityMapBuilder<K,V> putProviderInstance(K key, javax.inject.Provider<? extends V> value) Methods inherited from interface io.bootique.di.ScopeBuilder
in, initOnStartup, inSingletonScope, withoutScope
-
Method Details
-
put
- Throws:
DIRuntimeException
-
putInstance
- Throws:
DIRuntimeException- Since:
- 2.0.B1
-
put
- Throws:
DIRuntimeException
-
putProviderInstance
MapBuilder<K,V> putProviderInstance(K key, javax.inject.Provider<? extends V> value) throws DIRuntimeException - Throws:
DIRuntimeException- Since:
- 2.0.B1
-
putProvider
MapBuilder<K,V> putProvider(K key, Class<? extends javax.inject.Provider<? extends V>> value) throws DIRuntimeException - Throws:
DIRuntimeException
-
putInstances
- Throws:
DIRuntimeException- Since:
- 2.0.B1
-
put
Deprecated.since 2.0.B1 in favor ofputInstance(Object, Object)to avoid ambiguity- Throws:
DIRuntimeException
-
putProvider
@Deprecated default MapBuilder<K,V> putProvider(K key, javax.inject.Provider<? extends V> value) throws DIRuntimeException Deprecated.since 2.0.B1 in favor ofputProviderInstance(Object, Provider)to avoid ambiguity- Throws:
DIRuntimeException
-
putAll
Deprecated.since 2.0.B1 in favor ofputInstances(Map)to avoid ambiguity- Throws:
DIRuntimeException
-
putInstance(Object, Object)to avoid ambiguity