On Viernes 22 Octubre 2010 14:49:10 Sam Berlin escribió:

Oh, yes I've found that reading the jaavdocs (and I'm waiting for 3.0 release).

I suppose that with 2.0 isn't possible to do in an automated fashion, so let's 
wait for a 
mavenized 3.0

Thanks

> 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/assi
> stedinject/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.

Reply via email to