Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to resolve collection of types by super type #122

Open
prokyhb opened this issue Aug 4, 2024 · 0 comments
Open

Add possibility to resolve collection of types by super type #122

prokyhb opened this issue Aug 4, 2024 · 0 comments

Comments

@prokyhb
Copy link

prokyhb commented Aug 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant