Comment #2 on issue 809 by [email protected]: Guice Assisted Inject
with multiple implementations of interface
http://code.google.com/p/google-guice/issues/detail?id=809
Thanks for your response!
The approach you told would work and I thought about it too. But, I want to
use same create method for getting instance of B and C, which
implementation of A (B, C or D) to return should be determined by Guice
bindings.
If I create separate methods, then in my application code, I need to have a
if else and invoke one of the factory's create method. Having this if-else
means that the application code has to somehow know which implementation of
A it needs. I want to avoid this if-else.
Is that possible?
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/d/optout.