apatrida
02/10/2016, 11:38 AMval myLocalScope: InjektScope = InjektScope(DefaultRegistrar())
And it is a standalone scope. You can also register singleton factories, or other factories that delegate to another scope:
// delegate some factories to global Injekt instance
myLocalScope.addSingletonFactory { Injekt.get<SomeSingletonClass>() }
myLocalScope.addFactory { Injekt.get<SomeMultiValueClass>() }
And you have delegation. For the singleton you would have a reference to the object in both scopes, the multi value not since those instances are not remembered. For keyed multi value, or thread by key, you would also have both referencing the instances.
So you can do some linked scopes with you in full control. This could be used in Android per activity class where you create a local activity scope that delegates only some factories to the global scope that it decides should be available, and the rest it defines locally.
But that may not be enough for people.