2009/10/15 [email protected] <[email protected]>

> On Oct 15, 6:42 am, Johannes Schneider <[email protected]> wrote:
> > This is necessary because I inject the strategies using a parameter of
> > type "Collection<? extends ImageSelectionStrategy>".
> > Could that not-so-readable part with the type literals be skipped
> > somehow? I think that is quite a common use case and maybe should be
> > added to the multibinder?
>
> I think a your one-statement is the right fix here. If you write this
> too often, you can encapsulate it by using the Types utility class to
> compose the appropriate type objects:
>  bindWildcardCollectionForSet(binder(),
> ImageSelectionStrategy.class);
>
>
> http://google-guice.googlecode.com/svn/tags/2.0/javadoc/com/google/inject/util/Types.html
>

+1 for using the Types utility class, it's saved me from typing lots of
angle brackets!


> >

-- 
Cheers, Stuart

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

Reply via email to