T
- public class ValidatingOrderedConfigurationWrapper<T> extends AbstractConfigurationImpl<T> implements OrderedConfiguration<T>
List
as a OrderedConfiguration
, implementing validation of
values provided to an OrderedConfiguration
.Constructor and Description |
---|
ValidatingOrderedConfigurationWrapper(Class<T> expectedType,
ObjectLocator locator,
TypeCoercerProxy typeCoercer,
Orderer<T> orderer,
Map<String,org.apache.tapestry5.ioc.internal.OrderedConfigurationOverride<T>> overrides,
ContributionDef contribDef) |
Modifier and Type | Method and Description |
---|---|
void |
add(String id,
T object,
String... constraints)
Adds an ordered object to a service's contribution.
|
void |
addInstance(String id,
Class<? extends T> clazz,
String... constraints)
Adds an ordered object by instantiating (with dependencies) the indicated class.
|
void |
override(String id,
T object,
String... constraints)
Overrides a normally contributed object.
|
void |
overrideInstance(String id,
Class<? extends T> clazz,
String... constraints)
Instantiates an object and adds it as an override.
|
instantiate
public ValidatingOrderedConfigurationWrapper(Class<T> expectedType, ObjectLocator locator, TypeCoercerProxy typeCoercer, Orderer<T> orderer, Map<String,org.apache.tapestry5.ioc.internal.OrderedConfigurationOverride<T>> overrides, ContributionDef contribDef)
public void add(String id, T object, String... constraints)
OrderedConfiguration
add
in interface OrderedConfiguration<T>
id
- a unique id for the object; the id will be fully qualified with the contributing module's idobject
- to add to the service's configurationconstraints
- used to order the object relative to other contributed objectspublic void override(String id, T object, String... constraints)
OrderedConfiguration
override
in interface OrderedConfiguration<T>
id
- identifies object to overrideobject
- overriding object (may be null)constraints
- constraints for the overridden object, replacing constraints for the original object (even if
omitted, in which case the override object will have no ordering constraints)public void addInstance(String id, Class<? extends T> clazz, String... constraints)
OrderedConfiguration
addInstance
in interface OrderedConfiguration<T>
id
- of contribution (used for ordering)clazz
- class to instantiateconstraints
- used to order the object relative to other contributed objectspublic void overrideInstance(String id, Class<? extends T> clazz, String... constraints)
OrderedConfiguration
overrideInstance
in interface OrderedConfiguration<T>
id
- of object to overrideclazz
- to instantiateconstraints
- constraints for the overridden object, replacing constraints for the original object (even if
omitted, in which case the override object will have no ordering constraints)5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.