39
I'm trying to inject things with Google Guice 2.0 and I have the following structure:
FooAction implements Action
BarAction implements Action
I then have an ActionLibrary with the following constructor:
ActionLibrary (List<Action> theActions)
When I request an instance of ActionLibrary from Guice, I would like Guice to identify both of the registered Action classes (FooAction, BarAction) and pass them into the constructor. The motivation here being that when I add a third action BazAction, it would be as simple as registering it in the Module and it would automatically be added to the list in the constructor.
Is this possible?