Hi guys,
i need to inject several implementions of the same interface into the
same object.

interface IService<I,O>{
O execute(I);
}

class MyFacade {
IService<InObj, OutObj> updateService;
IService<InObj, OutObj> insertService;
//Constructor setting the services
// Methods executing the services
}

class InObj{}
class OutObj{}

Due to the same (Generics) signature of the service, i cannot profit
from the TypeLiteral generics support of Guice.
To do this in the Guice the User Guide recommends to use Annotations.
As far as I understand this means i have to define several
Annotations, one for each type of the Service.
Or is there any other possible solution out there?

Kind regards
Johannes
--~--~---------~--~----~------------~-------~--~----~
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