Class DIReactor
- java.lang.Object
-
- io.vertigo.core.node.component.di.DIReactor
-
public final class DIReactor extends Object
Reactor. - add components in any order with their id, their class - add ids for components that are already existing. - then 'proceed' and you obtain an ORDERED list of components, taking account of their dependencies.- Author:
- pchretien
-
-
Constructor Summary
Constructors Constructor Description DIReactor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DIReactor
addComponent(String id, Class<?> implClass)
Add a componentDIReactor
addComponent(String id, Class<?> implClass, Set<String> params)
Add a componentDIReactor
addParent(String id)
Add a component identified by its ID.List<String>
proceed()
Process the 'digital' reaction in a way to obtain an ordered list of components, taking account of their dependencies.
-
-
-
Method Detail
-
addComponent
public DIReactor addComponent(String id, Class<?> implClass)
Add a component- Parameters:
id
- ID f the componentimplClass
- Impl class of the component- Returns:
- this reactor
-
addComponent
public DIReactor addComponent(String id, Class<?> implClass, Set<String> params)
Add a component- Parameters:
id
- ID f the componentimplClass
- Impl class of the componentparams
- List of ID of all local params - which will be automatically injected-- Returns:
- this reactor
-
addParent
public DIReactor addParent(String id)
Add a component identified by its ID. This component is ready to be injected in other components (and it does not need to be resolved).- Parameters:
id
- ID of the component- Returns:
- this reactor
-
-