declare

inline fun <T> declare(instance: T, qualifier: Qualifier? = null, secondaryTypes: List<KClass<*>> = emptyList(), allowOverride: Boolean = true)

Declare a component definition from the given instance This result of declaring a single definition of type T, returning the given instance

Parameters

instance

The instance you're declaring.

qualifier

Qualifier for this declaration

secondaryTypes

List of secondary bound types

allowOverride

Allows to override a previous declaration of the same type (default to true).