ScopeComponent

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.

Parameters

T

The type of the Scope this component is associated with.

Inheritors

Properties

Link copied to clipboard
abstract val scope: Lazy<T>

A lazy-initialized property that holds the Scope instance. Accessing this property before the scope is injected will result in an error.

Functions

Link copied to clipboard
open fun injectScope(lazyScope: Lazy<T>)

Injects the actual Scope instance into the component. This method is designed to be called during the component's initialization phase (e.g., Activity.onCreate).

Link copied to clipboard

Checks if the scope has been injected and initialized.