When i have one implementation and i want
multiple versions (variants) of that implementation
during runtime, i use the robot-leg approach: private modules
and "re-bind" the dependencies like:

bind(String.class).annotatedWith(Names.named("realName")).to(Key.get(String.class, Names.named("otherRealName"));

This works well with required dependencies,
what about optional dependencies, that are marked with @Inject(optional = true)?
How can i rebind and preserve that optional behaviour?

Greetings
W

--
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to