fun WinterAware.createGraphAndInject(injector: Injector, block: ComponentBuilderBlock? = null): Graph
Create and return dependency graph for this and also pass the graph to the given injector by using WinterAware.injection.
injector
- The Injector to inject into.
block
- An optional builder block to pass to the component createGraph method.
io.jentz.winter.WinterException
- if this type is not supported.
Return
The created dependency graph.
fun <T : Any> WinterAware.createGraphAndInject(instance: T, injectSuperClasses: Boolean = false, block: ComponentBuilderBlock? = null): Graph
Create and return dependency graph for this and inject all members into instance by using WinterAware.injection.
This is useful in conjunction with JSR330 Inject
annotations.
instance
- The instance to inject into.
injectSuperClasses
- If true this will look for members injectors for super classes too.
block
- An optional builder block to pass to the component createGraph method.
io.jentz.winter.WinterException
- if this type is not supported.
Return
The created dependency graph.