AndroidScopes

sealed interface AndroidScopes : Scope

A sealed interface representing the different types of scopes available in the Android extension module. This provides a way to distinguish between scopes with different lifecycles, such as Activity, ViewModel, and retained scopes. It uses the delegation pattern to wrap a core DefaultScope instance.

Inheritors

Types

Link copied to clipboard

A scope that is retained across Activity recreation (e.g., on screen rotation). It is managed by a hidden ViewModel, making it survive configuration changes but not process death. Uses JvmInline for performance optimization.

Link copied to clipboard

A scope that is tied to the lifecycle of an Activity. It is created when the Activity is created and destroyed when the Activity is destroyed. Uses JvmInline for performance optimization by avoiding a wrapper class allocation at runtime.

Link copied to clipboard

A scope that is tied to the lifecycle of a ViewModel. This scope survives configuration changes and is only destroyed when the ViewModel is cleared. Uses JvmInline for performance optimization.

Properties

Link copied to clipboard
abstract val scope: DefaultScope

The underlying core DefaultScope instance.

Functions

Link copied to clipboard
abstract fun closeAll()
Link copied to clipboard
abstract fun declare(qualifier: Qualifier, instance: Any)
Link copied to clipboard
abstract fun get(qualifier: Qualifier): Any
Link copied to clipboard
abstract fun getSubScope(qualifier: Qualifier): Scope
Link copied to clipboard
abstract fun registerFactory(vararg modules: DependencyModule)
Link copied to clipboard
abstract fun resolvePath(path: Path): Scope