Comment by Bartosz.Michalik:

Assuming configuration
{{{
protected void configure() {
bind(new TypeLiteral<Broker<EventType,Date>>(){}).to(new TypeLiteral<SimpleBrokerImpl<Date>>(){});
                bind(Main.class);               
}
}}}
how can I get instance of parametrized Broker ?
The only way I've founded for now is
{{{
Broker<EventType, Date> broker = injector.getInstance(Key.get(new TypeLiteral<Broker<EventType, Date>>(){}));
}}}

Is there any better way?

For more information:
http://code.google.com/p/google-guice/wiki/FrequentlyAskedQuestions

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en.

Reply via email to