Identifier

data class Identifier<T : Any>(val kclass: KClass<T>, val qualifier: Qualifier = EmptyQualifier)

Identifies an injectable component via its type and optionally via other elements called qualifiers.

By default, identifiers use the empty qualifier object as a way of saying "there is no qualifier here". You generally do not need to use qualifiers if your environment only contains at most one object of a specific type. If you do need multiple objects of the same type, qualifiers such as the NameQualifier should be used to differentiate them.

Constructors

Link copied to clipboard
fun <T : Any> Identifier(kclass: KClass<T>, qualifier: Qualifier = EmptyQualifier)

Functions

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val kclass: KClass<T>

The class this identifier wraps

Link copied to clipboard
val qualifier: Qualifier

The qualifier for this identifier.