Hi Fred, That's the problem in a nutshell.
I did try an SPI-based solution, but because any type that Guice has a binding for is instantiated (and fails) it's not an option to iterate over the bindings and add new ones, unfortunately. --Jason. On Mar 30, 4:52 pm, Fred Faber <[email protected]> wrote: > If you have a mapping of raw binding => generically typed binding, then you > could iterate over the Elements of the Module you create using the SPI order > to add bindings for those generically typed values. That is, you could > replace a binding for List with a binding for List<String> programmatically > as long as you knew you wanted List<String> and not, e.g., List<Integer>. > Though this begs the question: how would you know what these mappings are? > And if you had that information, I wonder if it wouldn't be easier to use > it directly. > > Fred > > On Wed, Mar 30, 2011 at 10:46 AM, [email protected] <[email protected]>wrote: > > > > > > > > > Unfortunately you'll need to create a binding with full generic type > > information. Type listeners cannot create new bindings. > > > -- > > 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.
