No, there isn't a way. The main reason is that there's no defined order for how Modules will be configured, and Multibinder collates all the bindings from different modules. If you only want to expose a List from a single Module, it's easy enough to write an @Provides method that returns the List with the contents. If you want to join different Modules together, you lose the ability to specific a consistent ordering, so there's no point in exposing something that implies there would be a consistent ordering.
sam On Tue, Jun 14, 2011 at 9:52 AM, Dominik Obermaier < [email protected]> wrote: > Hi, > > I want to use the Multibinding feature of Google Guice. I searched the docs > and googled for it, but I did not find any answer to this question: > > Is it possible to define an order of the elements in an injected Collection > (e.g. List) ? And if, how do I achieve this? > > Thanks! > > Dominik Obermaier > > -- > 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.
