Assisted inject must figure out the real class. It can't figure it out from a parameterized type parameter.
If you want to save some keystrokes you can go with a custom "utility" like: useAssisedInjectFor(Foo.class).using(BarFactory.class); useAssisedInjectFor(Foo.class).generifiedWith(Baz.class).using(BarFactory.class); or similar. But I doubt this will give much added value. Cheers Alen On May 10, 6:08 pm, glenviewjeff <[email protected]> wrote: > I'd like to know how to represent a generic version of the following > binding that won't fail with xxx cannot be used as a key it is not fully > specified > > install(new FactoryModuleBuilder(). > implement(new TypeLiteral<SomeClass<T,?>>(){}, > new TypeLiteral<SomeOtherClass<T, U>>(){}). > build(new TypeLiteral<SomeFactory<T>>(){})); > > It seems that the implement method isn't available with a parameterized > type parameter. > > Thanks, > Jeff -- 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.
