Your suggestion is still specific to a particular set of type
parameters (<String, Integer>). I would have to add bindings for each
set of type parameters that I intend to use. I'm more thinking of a
<?, ?> binding (not really, but that's the closest Java syntax allows
you to express). See my other response from April 19th.

On Apr 19, 10:27 am, Thomas Suckow <[email protected]> wrote:
> Am I mistaken in believing this is what Mirko is looking for? One
> issue is that multiple annotations do not appear to be supported.
>
> Pseudo Code:
>
> TypeLiteral<Map<String, Integer>> literal = new
> TypeLiteral<Map<String, Integer>>() {;}
>
> bind(literal).annotatedWith(Identity.class).to(IdentityHashMap.class)
> bind(literal).annotatedWith(SynchronizedLinked.class).to(SynchronizedLinked­HashMap.class)
>
> --
> Thomas Suckow
>
>
>
> On Thu, Apr 19, 2012 at 3:57 AM, Thomas Broyer <[email protected]> wrote:
>
> > On Thursday, April 19, 2012 12:30:27 PM UTC+2, Reinhard Nägele wrote:
>
> >> This is, of course, possible. Look at
> >>http://code.google.com/p/google-guice/wiki/FrequentlyAskedQuestionsunder
> >> "How to inject class with generic type?"
>
> > Except that Mirko said: “I obviously don't want to create bindings
> > specifically for maps from String to Integer, but for maps in general.”
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "google-guice" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-guice/-/YfM_xhqTIjcJ.
>
> > 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.

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