K - V - public class ValidatingMappedConfigurationWrapper<K,V> extends AbstractConfigurationImpl<V> implements MappedConfiguration<K,V>
MappedConfiguration interface, and provides
two forms of validation for mapped configurations:
ContributionDef, then a
warning is logged| Constructor and Description |
|---|
ValidatingMappedConfigurationWrapper(Class<V> expectedValueType,
ObjectLocator locator,
TypeCoercerProxy typeCoercer,
Map<K,V> map,
Map<K,MappedConfigurationOverride<K,V>> overrides,
String serviceId,
ContributionDef contributionDef,
Class<K> expectedKeyType,
Map<K,ContributionDef> keyToContributor) |
| 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.
|
instantiatepublic ValidatingMappedConfigurationWrapper(Class<V> expectedValueType, ObjectLocator locator, TypeCoercerProxy typeCoercer, Map<K,V> map, Map<K,MappedConfigurationOverride<K,V>> overrides, String serviceId, ContributionDef contributionDef, Class<K> expectedKeyType, Map<K,ContributionDef> keyToContributor)
public void add(K key, V value)
MappedConfigurationadd in interface MappedConfiguration<K,V>key - unique id for the valuevalue - to contributepublic void addInstance(K key, Class<? extends V> clazz)
MappedConfigurationaddInstance in interface MappedConfiguration<K,V>key - unique id for the valueclazz - class to instantiate and contributepublic void override(K key, V value)
MappedConfigurationoverride in interface MappedConfiguration<K,V>key - unique id of value to overridevalue - new value, or null to remove the key entirelypublic void overrideInstance(K key, Class<? extends V> clazz)
MappedConfigurationoverrideInstance in interface MappedConfiguration<K,V>key - unique id of value to overrideclazz - class to instantiate as override5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.