I know this may not be dependency injection in its purest form, but let's say I have to use :
@Inject
Injector injector;
With this injector, is it possible to get all the binded instances given :
I see the Injector#findBindingsByType() method but I'm not sure if it can help in that regard.
You can inject a list of a given type associated through multibindings. Check out the docs:
https://github.com/google/guice/wiki/Multibindings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With