BindBuilder

interface BindBuilder<C : Any>

Base builder DSL interface that allows to define scoped and context bindings.

Parameters

C

The context type.

Types

WithScope
Link copied to clipboard
common
interface WithScope<C : Any> : DI.BindBuilder<C>
Used to define bindings with a scope.

Properties

contextType
Link copied to clipboard
common
abstract val contextType: TypeToken<C>
The context type that will be used by all bindings that are defined in this DSL context.
explicitContext
Link copied to clipboard
common
abstract val explicitContext: Boolean

Inheritors

DI.BindBuilder
Link copied to clipboard
DI
Link copied to clipboard

Extensions

factory
Link copied to clipboard
common
inline fun <C : Any, A : Any, T : Any> DI.BindBuilder<C>.factory(noinline creator: BindingDI<C>.(A) -> T): Factory<C, A, T>
Creates a factory: each time an instance is needed, the function creator function will be called.
provider
Link copied to clipboard
common
inline fun <C : Any, T : Any> DI.BindBuilder<C>.provider(noinline creator: NoArgBindingDI<C>.() -> T): Provider<C, T>
Creates a factory: each time an instance is needed, the function creator function will be called.