Created
July 12, 2020 16:14
-
-
Save rygelouv/145c4c21523629f1c20b3bbf3f7ede9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LiteKoin { | |
| private val registry = ServiceLocator() | |
| lateinit var declarations: Map<KClass<*>, Declaration<Any>> | |
| fun loadModules(modules: List<Module>) { | |
| declarations = modules.declarationRegistry | |
| registry.loadModules(modules) | |
| } | |
| fun resolveInstance(type: KClass<*>) = registry.getService(type) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment