The latest version of Guice (in SVN, and soon to be Guice 3.0) has: http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/FactoryModuleBuilder.html .
On 10/22/10, Asier <[email protected]> wrote: > Hi > > I have some services which need @Assisted in its constructor to supply some > default data, so I'm using things like > > binder.bind(CarBookingFactory.class) > .toProvider(FactoryProvider.newFactory(CarBookingFactory.class, > CarBookingService.class)); > > in my modules. If it's possible I want to have one factory for all the > booking > services, so instead of having one interface for each service: > > interface CarBookingFactory { > CarBookingService create(String brand, CarExtras carExtras); > } > > have one interface for all the booking services: > > interface BookingFactory { > CarBookingService create(String brand, CarExtras carExtras); > BikeBookingService create(String brand); > BoatBookingService create(String brand, BoatExtras boatExtras); > } > > Is this possible? > > Thanks > > -- > 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.
