|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.ioc.internal.AbstractConfigurationImpl<V> org.apache.tapestry5.ioc.internal.ValidatingMappedConfigurationWrapper<K,V>
K
- V
- public class ValidatingMappedConfigurationWrapper<K,V>
A wrapper around a Map that provides the MappedConfiguration
interface, and provides
two forms of validation for mapped configurations:
ContributionDef
, then a
warning is logged
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.tapestry5.ioc.internal.AbstractConfigurationImpl |
---|
instantiate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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)
Method Detail |
---|
public void add(K key, V value)
MappedConfiguration
add
in interface MappedConfiguration<K,V>
key
- unique id for the valuevalue
- to contributepublic void addInstance(K key, Class<? extends V> clazz)
MappedConfiguration
addInstance
in interface MappedConfiguration<K,V>
key
- unique id for the valueclazz
- class to instantiate and contributepublic void override(K key, V value)
MappedConfiguration
override
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)
MappedConfiguration
overrideInstance
in interface MappedConfiguration<K,V>
key
- unique id of value to overrideclazz
- class to instantiate as override
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |