Class ValidatingOrderedConfigurationWrapper<T>
java.lang.Object
org.apache.tapestry5.ioc.internal.AbstractConfigurationImpl<T>
org.apache.tapestry5.ioc.internal.ValidatingOrderedConfigurationWrapper<T>
- Type Parameters:
T-
- All Implemented Interfaces:
OrderedConfiguration<T>
public class ValidatingOrderedConfigurationWrapper<T>
extends AbstractConfigurationImpl<T>
implements OrderedConfiguration<T>
Wraps a
List as a OrderedConfiguration, implementing validation of
values provided to an OrderedConfiguration.-
Constructor Summary
ConstructorsConstructorDescriptionValidatingOrderedConfigurationWrapper(Class<T> expectedType, ObjectLocator locator, TypeCoercerProxy typeCoercer, Orderer<T> orderer, Map<String, org.apache.tapestry5.ioc.internal.OrderedConfigurationOverride<T>> overrides, ContributionDef contribDef) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an ordered object to a service's contribution.voidaddInstance(String id, Class<? extends T> clazz, String... constraints) Adds an ordered object by instantiating (with dependencies) the indicated class.voidOverrides a normally contributed object.voidoverrideInstance(String id, Class<? extends T> clazz, String... constraints) Instantiates an object and adds it as an override.Methods inherited from class org.apache.tapestry5.ioc.internal.AbstractConfigurationImpl
instantiate
-
Constructor Details
-
ValidatingOrderedConfigurationWrapper
public ValidatingOrderedConfigurationWrapper(Class<T> expectedType, ObjectLocator locator, TypeCoercerProxy typeCoercer, Orderer<T> orderer, Map<String, org.apache.tapestry5.ioc.internal.OrderedConfigurationOverride<T>> overrides, ContributionDef contribDef)
-
-
Method Details
-
add
Description copied from interface:OrderedConfigurationAdds an ordered object to a service's contribution. Each object has an id (which must be unique). Optionally, pre-requisites (a list of ids that must precede this object) and post-requisites (ids that must follow) can be provided. If no constraints are supplied, then an implicit constraint is supplied: after the previously contributed id within the same contribution method.- Specified by:
addin interfaceOrderedConfiguration<T>- Parameters:
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 objects
-
override
Description copied from interface:OrderedConfigurationOverrides a normally contributed object. Each override must match a single normally contributed object.- Specified by:
overridein interfaceOrderedConfiguration<T>- Parameters:
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)
-
addInstance
Description copied from interface:OrderedConfigurationAdds an ordered object by instantiating (with dependencies) the indicated class. When the configuration type is an interface and the class to be contributed is a local file, then a reloadable proxy for the class will be created and contributed.- Specified by:
addInstancein interfaceOrderedConfiguration<T>- Parameters:
id- of contribution (used for ordering)clazz- class to instantiateconstraints- used to order the object relative to other contributed objects
-
overrideInstance
Description copied from interface:OrderedConfigurationInstantiates an object and adds it as an override. When the configuration type is an interface and the class to be contributed is a local file, then a reloadable proxy for the class will be created and contributed.- Specified by:
overrideInstancein interfaceOrderedConfiguration<T>- Parameters:
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)
-