|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OrderedConfiguration<T>
Object passed into a service contributor method that allows the method provide contributed values to the service's configuration.
A service can collect contributions in three different ways:
Contribute
,
UsesConfiguration
Method Summary | |
---|---|
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. |
Method Detail |
---|
void add(String id, T object, String... constraints)
If no constraints are supplied, then an implicit constraint is supplied: after the previously contributed id within the same contribution method.
id
- a unique id for the object; the id will be fully qualified with the contributing module's idconstraints
- used to order the object relative to other contributed objectsobject
- to add to the service's configurationvoid override(String id, T object, String... constraints)
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)void addInstance(String id, Class<? extends T> clazz, String... constraints)
id
- of contribution (used for ordering)clazz
- class to instantiateconstraints
- used to order the object relative to other contributed objectsvoid overrideInstance(String id, Class<? extends T> clazz, String... constraints)
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |