Comment #2 on issue 300 by Rinsvind: Allow getInstance/getProvider by
TypeLiteral
http://code.google.com/p/google-guice/issues/detail?id=300
No. I think this is a convenience/cosmetic (as opposed to functional) issue
so no
real work around is needed. I just use
Injector.getInstance(Key.get(<type literal>));
rather than directly (as I wish I could)
Injector.getInstance(<type literal>);
I suppose you can try adding somewhere a convenience method:
public static <T> T getInstance(Injector injector, TypeListeral<T> literal)
{
return injector.get(Key.get(literal));
}
My patch simply adds this directly to the injector anyway.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---