--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/3b354f12-1927-44fb-ac0d-94b28941ced6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAHNex995t_ae%2BKnFpHSxB5vVHLNkP%2BhY%2BdCt5-8VQOpM1BsHqw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAJEBNUdoCzATtdVH2zBS%2BZgdjQYUCWbq9gn2xh-AvfzEwkB6Dg%40mail.gmail.com.
If <T> is only used as an assisted param (and *not* used by any injected ones), then I think we can get away with just ignoring it. The compiler will make sure the types are safe, and we can just pretend T is its erased type. So long as the user supplies us the T and we don't have to worry about locating anything that references a T... there won't be any unknowns.
sam
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAHNex98Xi8O3f6z%3Dw3PXtF%2BCsJYyrfoK2oeWrOKgVkyDMzrr9g%40mail.gmail.com.
Assuming you meant:interface FooFactory {<T> Foo<T> create(T bar);}
This is the closest you can get. I use it pretty frequently:interface FooFactory<T> {Foo<T> create(T bar);}
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAJEBNUc4NPP3AGpu7%3DH-5vB3m59XikRnAA4-cmaET7S_vEhi%3DQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAHNex9-1TRd4uVkXM6gtpVsAc%2BSx%2Bwb6s%3Dd5rJ6bmq9SGsXeMA%40mail.gmail.com.