On Mon, Jul 27, 2009 at 11:16 AM, Jeremy Chone <[email protected]>wrote:
> > Thank you for the response. > > There is one thing I am still confused about Guice, is how to bind > array of Objects (when you want the Objects themselves to go through > the Guice injector). Multibinder is exactly what you want here. Note that you still have to specify how to bind each of the instances. If they are all the same, then it is quite simple to write a provides method that fills up the Collection with however many objects you need. > > In my model, the specialObjects do not have to have any interface or > base class in common. They just have some of their methods annotated > in a special way. Seems like what you want is fairly specialized, with logic dictating how each instance is created. You probably don't want Guice magicking this away for you. Especially if you want another set of eyes to easily pick up what's going on. HTH, Dhanji. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
