Package-level declarations

Types

Link copied to clipboard
class DefaultScope(val qualifier: Qualifier, val parent: DefaultScope? = null) : Scope
Link copied to clipboard

A delegate class that implements ScopeComponent to provide a late-initialized scope. It acts as a placeholder for a Scope that will be injected later in the component's lifecycle. This is particularly useful in Android where context-dependent scopes cannot be created at property initialization time.

Link copied to clipboard
interface RootComponent

Represents the root component of the dependency injection graph, typically the Application class. It holds the root Scope from which all other scopes are derived.

Link copied to clipboard
interface Scope

Represents a lexical scope that holds and manages dependency instances. Scopes can be nested to create a hierarchy, allowing for managing dependencies with different lifecycles. Instances resolved in a child scope can access dependencies from its parent scope.

Link copied to clipboard
interface ScopeComponent<T : Scope>

An interface for components that are associated with a Scope. This is typically implemented by Android components like Activity or ViewModel to enable scope lifecycle management and dependency injection.

Functions

Link copied to clipboard
@JvmName(name = "inlineGet")
inline fun <T : Any> DefaultScope.get(qualifier: Qualifier = TypeQualifier(T::class), noinline pathBuilder: ScopePathBuilder.() -> Path = { Path() }): Any
fun DefaultScope.get(qualifier: Qualifier, pathBuilder: ScopePathBuilder.() -> Path): Any
Link copied to clipboard
inline fun <T> Lazy<DefaultScope>.inject(qualifier: Qualifier = TypeQualifier(T::class), mode: LazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED): Lazy<T>
inline fun <T> Lazy<DefaultScope>.inject(qualifier: Qualifier = TypeQualifier(T::class), mode: LazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED, noinline pathBuilder: ScopePathBuilder.() -> Path): Lazy<T>
Link copied to clipboard