winter / io.jentz.winter / WinterTree / open

open

fun open(vararg path: Any, identifier: Any? = null, block: ComponentBuilderBlock? = null): Graph

Create a object graph by (sub-)component path and register it. Opened object graphs will be children of each other in left to right order.

Parameters

path - The path of the (sub-)graph to initialize.

identifier - An optional identifier to store the subgraph under.

block - An optional ComponentBuilderBlock that's passed to the (sub-)component createGraph method.

Exceptions

WinterException - When application component is not set or path can not be resolved.

IllegalArgumentException - When path is empty (root) but identifier is given.

Return
The newly created and registered graph.