inject

@JvmName(name = "injectAndroidScope")
inline fun <T> Lazy<AndroidScopes>.inject(qualifier: Qualifier = TypeQualifier(T::class), mode: LazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED): Lazy<T>

Lazily injects a dependency from an AndroidScopes instance.

Return

A Lazy delegate that provides the dependency instance T.

Parameters

T

The type of the dependency to inject.

qualifier

An optional Qualifier to distinguish between dependencies of the same type.

mode

The LazyThreadSafetyMode for the lazy delegate.


@JvmName(name = "injectAndroidScope")
inline fun <T> Lazy<AndroidScopes>.inject(qualifier: Qualifier = TypeQualifier(T::class), mode: LazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED, noinline pathBuilder: ScopePathBuilder.() -> Path): Lazy<T>

Lazily injects a dependency from a sub-scope specified by a path.

Return

A Lazy delegate that provides the dependency instance T.

Parameters

T

The type of the dependency to inject.

qualifier

An optional Qualifier to distinguish between dependencies of the same type.

mode

The LazyThreadSafetyMode for the lazy delegate.

pathBuilder

A DSL block to define the path to the target scope.