ActivityRetainedScopeModuleBuilder

A specialized AbstractModuleBuilder for defining dependencies within an activity-retained scope. This builder allows for nesting activityScope and viewModelScope inside a scope that survives configuration changes.

Constructors

Link copied to clipboard
constructor(scope: Scope)

Properties

Link copied to clipboard
Link copied to clipboard
open override val scope: Scope

The current activity-retained Scope in which the dependencies are being defined.

Functions

Link copied to clipboard
inline fun <T : Activity> activityScope(qualifier: Qualifier = TypeQualifier(T::class), noinline block: ActivityScopeModuleBuilder.() -> Unit)

Defines a nested, standard ActivityScope within the retained scope. Dependencies defined here will be tied to the Activity's lifecycle and will be recreated if the Activity is recreated.

Link copied to clipboard
fun <T : AbstractModuleBuilder> baseScope(qualifier: Qualifier, builderGenerator: DefaultScope.() -> T, block: T.() -> Unit)
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> factory(qualifier: Qualifier, noinline create: () -> T)
Link copied to clipboard
inline fun <T : Any> get(qualifier: Qualifier): T
Link copied to clipboard
inline fun <T : Any> scope(qualifier: Qualifier, noinline block: DependencyModuleBuilder.() -> Unit)
Link copied to clipboard
inline fun <T : Any> single(qualifier: Qualifier, noinline create: () -> T)
Link copied to clipboard
inline fun <T : ViewModel> AbstractModuleBuilder.viewModel(qualifier: Qualifier = TypeQualifier(T::class), noinline create: () -> T)
Link copied to clipboard
inline fun <T : ViewModel> viewModelScope(qualifier: Qualifier = TypeQualifier(T::class), noinline block: ViewModelScopeModuleBuilder.() -> Unit)

Defines a nested ViewModelScope within the retained scope.