ScopeRegistry

sealed class ScopeRegistry : ScopeCloseable

A registry is responsible managing references inside a scope.

Functions

clear
Link copied to clipboard
abstract fun clear()
close
Link copied to clipboard
override fun close()
getOrCreate
Link copied to clipboard
abstract fun getOrCreate(key: RegKey, sync: Boolean = true, creator: () -> Reference<Any>): Any

Get or create a value that correspond for the given key.

getOrNull
Link copied to clipboard
abstract fun getOrNull(key: RegKey): () -> Any??
remove
Link copied to clipboard
abstract fun remove(key: RegKey)
values
Link copied to clipboard
abstract fun values(): Iterable<Pair<RegKey, () -> Any?>>

Inheritors

StandardScopeRegistry
Link copied to clipboard
SingleItemScopeRegistry
Link copied to clipboard