Binding

interface Binding<C : Any, A, T : Any>

Base class that knows how to get an instance.

All bindings are bound to a Binding. Whether this factory creates a new instance at each call or not is left to implementation.

Parameters

C

The type of the context used by the retriever.

A

The type of argument used to create or retrieve an instance.

T

The type of instance this factory creates or retrieves.

Inheritors

Functions

Link copied to clipboard
abstract fun getFactory(key: DI.Key<C, A, T>, di: BindingDI<C>): (A) -> T

Returns a factory for the given key. A factory is a function that returns an instance of type T function argument A.