hi hi sometime ago I created a [add-on library](<h...
# kodein
a
hi hi sometime ago I created a [add-on library](https://github.com/arudiscord/kodein-jit-bindings) for Kodein that creates instances with reflection and I wanna ask if you guys would like me to PR this add-on to the main repository. the use of this library is to leverage ClassGraph/Reflections classpath scanning to instantiate classes using Kodein mappings.
r
So the point is to be able to modify the container at runtime ? as Kodein-JxInject would allow ?
a
I actually wanted to modify the container at first but only managed to
externalFactory
it. in a way, it was indeed based on JxInject but doesn't require the Inject annotation.
one actual use: https://github.com/arudiscord/psi/blob/master/src/main/kotlin/pw/aru/psi/bootstrap/RegistryBootstrap.kt#L55-L72 it uses a ClassGraph's ScanResult of the classpath, instantiates all commands (using Kodein and Kodein-jit-bindings
kodein.jitInstance(class)
) and registers it on a CommandRegistry.