Comment #1 on issue 290 by dhanji: New BindingTargetVisitor interface needs  
wildcard types
http://code.google.com/p/google-guice/issues/detail?id=290

Unfortunately, this is not what a wildcard means. When you say Iterable<?>  
it means an iterable of *any-one-
thing*. Not an iterable of *everything*.

This is an essential problem with naturally heterogenous collections (like  
Injector#getBindings) in Java. The
language is not designed to support them. A better solution would be to  
provide a special method that
returns Iterator<Object> over all the bindings and fall back to the  
inspect-and-cast route of yesteryear.

Weakening the specific instance method types to bounded wildcards seems  
like an imprudent trade to me.



--
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to