with
Binds the previously given tag to the given instance.
T generics will be erased!
Parameters
T
The type of value to bind.
value
The instance to bind.
infix inline fun <C : Any, A : Any, T : Any> TypeBinderSubTypes<T>.with(noinline block: (TypeToken<out T>) -> DIBinding<in C, in A, out T>)
Content copied to clipboard
Allows to define a binding that will be called for any subtype of this type.
First part of the bind<Type>().subTypes() with { type -> binding } syntax.
Parameters
T
The parent type.
block
A function that will give the binding for the provided sub-type.