Status: New
Owner: ----
New issue 438 by eljobe: requireBinding() should work with TypeLiteral
http://code.google.com/p/google-guice/issues/detail?id=438
I would like to require that there be a binding for a List of Strings before
someone else can use my module.
requireBinding(new TypeLiteral<List<String>>() {});
Should work, but there is no support for such a call.
Work Around:
requireBinding(Key.get(new TypeLiteral<List<String>>() {}));
Simple implementation:
public void requireBinding(TypeLiteral<T> typeLiteral) {
requireBinding(Key.get(typeLiteral));
}
--
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
-~----------~----~----~----~------~----~------~--~---