Hi,

I recently started to use the Multibinder - thanks for that work.
But now I find me writing that code several times:


    Multibinder<ImageSelectionStrategy> strategyMultibinder =
Multibinder.newSetBinder( binder(), ImageSelectionStrategy.class );

    strategyMultibinder.addBinding().to( Impl1.class );
    strategyMultibinder.addBinding().to( Impl2.class );

    bind( new TypeLiteral<Collection<? extends ImageSelectionStrategy>>() {
    } ).to( new TypeLiteral<Set<ImageSelectionStrategy>>() {
    } );


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?


Sincerly,

Johannes

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