public interface MappedConfiguration<K,V>
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
V value)
Adds a keyed object to the service's contribution.
|
void |
addInstance(K key,
Class<? extends V> clazz)
Adds a keyed object as an instantiated instance (with dependencies injected) of a class.
|
void |
override(K key,
V value)
Overrides an existing contribution by its key.
|
void |
overrideInstance(K key,
Class<? extends V> clazz)
Overrides an existing contribution with a new instance.
|
void add(K key, V value)
key
- unique id for the valuevalue
- to contributeIllegalArgumentException
- if key is not uniquevoid override(K key, V value)
key
- unique id of value to overridevalue
- new value, or null to remove the key entirelyvoid addInstance(K key, Class<? extends V> clazz)
key
- unique id for the valueclazz
- class to instantiate and contributevoid overrideInstance(K key, Class<? extends V> clazz)
key
- unique id of value to overrideclazz
- class to instantiate as override5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.