The javadoc of FactoryModuleBuilder should explain this case. Just omit the .implement(..) method. By default it assumes the return type of the factory method is the implementation type.
sam On Thu, May 12, 2011 at 10:05 AM, Christopher Piggott <[email protected]>wrote: > Hi, > > I've been using assisted injection like this: > > > bind(MaintDbUtil.Factory.class).toProvider(FactoryProvider.newFactory( > MaintDbUtil.Factory.class, > MaintDbUtil.class)); > > Now, however, it seems the FactoryProvider class is deprecated. I'm > having trouble figuring out exactly what I'm supposed to do. > > install(new FactoryModuleBuilder().implement(MaintDbUtil.class, > MaintDbUtil.class).build(MaintDbUtil.Factory.class)); > > Is that right? The .impelment part is all screwed up, though, because > in this case there's no interface being implemented. I just want to > bind a single, concrete class to a factory. > > How do I do this in 3.0? > > --Chris > > -- > 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. > > -- 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.
