winter / io.jentz.winter.aware / inject

inject

fun WinterAware.inject(injector: Injector): Unit

Get dependency graph for this and inject dependencies into injector by using WinterAware.injection.

Parameters

injector - The Injector to inject into.

Exceptions

io.jentz.winter.WinterException - if type of this is not supported.

fun <T : Any> WinterAware.inject(instance: T, injectSuperClasses: Boolean = false): Unit

Inject into instance by using the dependency graph of this by using WinterAware.injection. This is useful in conjunction with Winters JSR330 annotation processor.

Parameters

instance - The instance to retrieve the dependency graph for and inject dependencies into.

injectSuperClasses - If true this will look for members injectors for super classes too.

Exceptions

io.jentz.winter.WinterException - If given instance type is not supported.