kiwi
kiwi copied to clipboard
Add possibility to resolve collection of types by super type
Hello there,
I'm developing an app with bunch of flavors, each of flavor has different set of features based on some adapters (barcode processors for barcode scanners). I wonder if it makes sense to define available adapters in scoped containers for each flavor (different instances of an app) and then loading registered adapters by supertype.
So instead of trying to resolve specific instance using
T? resolveAs<S, T extends S>
, we could have something like
List<T> resolveBunchOfGuysBySuperType<T>
. (ofc not production name :-)
So the app could be universal, this way I could load all registered processors in scoped container for a flavor without need to know what is actually registered there.
Does this make sense to you? If so, can we make this happen? I can prepare MR myself i suppose. Thank you.