In the Guice FAQ, they talk about differentiating multiple instances with annotations (kind of).
My question: Can I bind a Impl to an Interface without an annotation, and bind another Impl to that same Interface with an annotation? Basically my first impl is going to act as a container for the others.
bind(SecurityAuthorizer.class).to(CompositeSecurityAuthorizer.class);
bind(SecurityAuthorizer.class)
.annotatedWith(Names.named(ComponentAuthorizer.class.getSimpleName()))
.to(ComponentAuthorizer.class).in(Singleton.class);
Bonus question, is our usage of Names.named(..) considered bad form? Just trying to avoid creating a ton of annotation classes, yet wanted the benefits of being able to refactor.