inject

inline fun <T : Any> inject(qualifier: Any? = null): T

Inject an instance with resolved dependencies.

Parameters

qualifier

Qualifier for identification. Specify the instantiation of the annotation with Qualifier.


inline fun <T : Any> inject(qualifier: Any? = null, componentExtras: ComponentExtras<*>? = null): T

Inject an instance with resolved dependencies (experimental)

Parameters

qualifier

Qualifier for identification. Specify the instantiation of the annotation with Qualifier.

componentExtras

Specify ComponentExtras to create Component.


inline fun <T : Any> inject(name: String): T

Deprecated

The method of specifying qualifier has been unified.

Replace with

import com.moriatsushi.koject.Named
inject(Named(name))

Inject an Named instance with resolved dependencies.

Parameters

name

name of Named