interface WinterAware
Implementing this interface gives simpler syntax for dependency retrieval and is particularly useful in cases where constructor injection is not possible. |
fun WinterAware.createGraph(block: ComponentBuilderBlock? = null): Graph
Create and return dependency graph for this by using WinterAware.injection. |
|
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. 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. |
|
fun WinterAware.disposeGraph(): Unit
Dispose the dependency graph of this by using WinterAware.injection. |
|
fun <A : Any, R : Any> WinterAware.factory(qualifier: Any? = null, generics: Boolean = false): Factory<A, R>
Retrieve a non-optional factory function that takes an argument of type A and returns R. |
|
fun <A : Any, R : Any> WinterAware.factoryOrNull(qualifier: Any? = null, generics: Boolean = false): Factory<A, R>?
Retrieve an optional factory function that takes an argument of type A and returns R. |
|
fun WinterAware.inject(injector: Injector): Unit
Get dependency graph for this and inject dependencies into injector by using WinterAware.injection. 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. |
|
fun <R : Any> WinterAware.instance(qualifier: Any? = null, generics: Boolean = false): R
Retrieve a non-optional instance of R. fun <A, R : Any> WinterAware.instance(argument: A, qualifier: Any? = null, generics: Boolean = false): R
Retrieve a factory of type |
|
fun <R : Any> WinterAware.instanceOrNull(qualifier: Any? = null, generics: Boolean = false): R?
Retrieve an optional instance of R. fun <A, R : Any> WinterAware.instanceOrNull(argument: A, qualifier: Any? = null, generics: Boolean = false): R?
Retrieve an optional factory of type |
|
fun <R : Any> WinterAware.instancesOfType(generics: Boolean = false): Set<R>
Retrieve all instances of type R. |
|
fun <R : Any> WinterAware.lazyInstance(qualifier: Any? = null, generics: Boolean = false): Lazy<R>
Create a Lazy that retrieves an instance of fun <A, R : Any> WinterAware.lazyInstance(argument: A, qualifier: Any? = null, generics: Boolean = false): Lazy<R>
Create a Lazy that retrieves a factory of type |
|
fun <R : Any> WinterAware.lazyInstanceOrNull(qualifier: Any? = null, generics: Boolean = false): Lazy<R?>
Create a Lazy that retrieves an optional instance of fun <A, R : Any> WinterAware.lazyInstanceOrNull(argument: A, qualifier: Any? = null, generics: Boolean = false): Lazy<R?>
Create a Lazy that retrieves an optional factory of type |
|
fun <R : Any> WinterAware.provider(qualifier: Any? = null, generics: Boolean = false): Provider<R>
Retrieve a non-optional provider function that returns R. fun <A, R : Any> WinterAware.provider(argument: A, qualifier: Any? = null, generics: Boolean = false): Provider<R>
Retrieve a factory of type |
|
fun <R : Any> WinterAware.providerOrNull(qualifier: Any? = null, generics: Boolean = false): Provider<R>?
Retrieve an optional provider function that returns R. fun <A, R : Any> WinterAware.providerOrNull(argument: A, qualifier: Any? = null, generics: Boolean = false): Provider<R>?
Retrieve an optional factory of type |
|
fun <R : Any> WinterAware.providersOfType(generics: Boolean = false): Set<Provider<R>>
Retrieve all providers of type R. |