>
> Don't you mean
>
>
> bind(FooComponent.class).annotatedWith(named("1")).to(FooComponentImpl.class).in(Scopes.SINGLETON);
>
> Else how does Guice resolve requests for FooComponent?
You need that too, though I think it actually needs to be:
bind(FooComponent.class).annotatedWith(named("1")).to(Key.get(FooComponentImpl.class,
named("1")));
You don't need the .in(Scopes.SINGLETON) there for reasons mentioned above.
--
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.