interface IDeviceDelegate {
Map<string,IDevice> implementedDevice;
}
class PrinterDelegate imple IDeviceDelegate {
...
}
class CarderReaderDelegate imple IDeviceDelegate {
...
}
like this above,there is a map element in interface
IDeviceDelegate,how to inject it into the implement classes?
my solution is like this:
1.define one AbstractModule for each implement classes
2.create a Injector for each AbstractModule
3.get map instance by the injectors
4.manually inject the map instance into the implement classes
its seems to complex,is there a simple solution?
--
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.