Scope class
Constructors
Scope ({String id , Koin koin , ScopeDefinition scopeDefinition , dynamic source } )
Methods
bind <S , T > ([Qualifier qualifier ] )
→ S
Get instance of primary type T and secondary type S
(not for scoped instances)
override
bindWithParam <S , K , P > (P param , {Qualifier qualifier } )
→ S
Get instance instance from Koin by Primary Type K, as secondary type S
@param parameters
override
bindWithType <S > (Type primaryType , Type secondaryType , Parameter parameter )
→ S
Get instance of primary type P and secondary type S
(not for scoped instances)
clear ()
→ void
close ()
→ void
Close all instances from this scope
create (KtList <Scope > links )
→ void
createEagerInstances ()
→ void
declare <T > (T instance , {Qualifier qualifier , List <Type > secondaryTypes , bool override = false } )
→ void
Declare a component definition from the given instance
This result of declaring a scoped/single definition of type T
, returning the given instance
(single definition of th current scope is root)
disposeInstances (ScopeDefinition scopeDefinition )
→ void
findInOtherScope <T > (Type type , Qualifier qualifier , Parameter parameter )
→ T
get <T > ([Qualifier qualifier ] )
→ T
override
getAll <T > ()
→ List <T >
Get a all instance for given inferred class (in primary or secondary type)
getAllInstanceFactory <T > ()
→ KtList <InstanceFactory >
Returns all InstanceFactory's scope.
getAllWithType <T > (Type type )
→ List <T >
Get a all instance for given class (in primary or secondary type)
@param clazz T
getFromSource <T > (Type type )
→ T
getKoin ()
→ Koin
Get current Koin instance
getOrNull <T > ([Qualifier qualifier , Parameter parameter ] )
→ T
Get a Koin instance if available
@param qualifier
@param scope
@param parameters
getScope (String scopeID )
→ Scope
Get Scope
@param scopeID
getSource <T > ()
→ T
getWithParam <T , P > (P parameter , {Qualifier qualifier } )
→ T
override
getWithType <T > (Type type , Qualifier qualifier , Parameter parameter )
→ T
Get a Koin instance
@param clazz
@param qualifier
@param parameters
getWithTypeOrNull <T > (Type type , Qualifier qualifier , Parameter parameter )
→ T
Get a Koin instance if available
@param qualifier
@param scope
@param parameters
inject <T > ([Qualifier qualifier ] )
→ Lazy <T >
Lazy inject instance from Koin
@param qualifier
@param parameters
override
injectOrNull <T > ([Parameter parameter , Qualifier qualifier ] )
→ Lazy <T >
Lazy inject a Koin instance if available
@param qualifier
@param scope
@param parameters
injectWithParam <T , P > (P parameter , {Qualifier qualifier } )
→ Lazy <T >
Lazy inject instance from Koin
override
linkTo (List <Scope > scopes )
→ void
Add parent Scopes to allow instance resolution
i.e: linkTo(scopeC) - allow to resolve instance to current scope and scopeC
loadDefinitions (ScopeDefinition scopeDefinition )
→ void
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a non-existent method or property is accessed.
inherited
registerCallback (ScopeCallback callback )
→ void
Register a callback for this Scope Instance
resolveInstance <T > (Type type , Qualifier qualifier , Parameter parameter )
→ T
toString ()
→ String
A string representation of this object.
override
unlink (List <Scope > scopes )
→ void
Remove linked scope
/