This is very similar to this

http://pastie.org/453944

from this thread

http://groups.google.com/group/google-guice/browse_thread/thread/efcdcd851c06ca1d/182ce22e96d9eb90#182ce22e96d9eb90

I've taken the liberty of modifying your example and put it here

http://pastie.org/468210

As generic cast goes it is as good as it gets. At least from what I
can tell.

But you don't need to use the MapBinder here is an example without. It
creates Factories on the fly. I use child injectors maybe this is a
bit questionable. Does it make a difference if you have a 100+ child
injectors?

This is just on the fly haven't given it that much tought. Here is the
code.

http://pastie.org/468219

Maybe some of this can be included in the wiki?

Cheers,
Alen

On May 4, 10:30 pm, Leigh Klotz <[email protected]> wrote:
> Here's my updated version of an example showing how to combine
> Mapbinder and Assisted Inject.
>
> http://graflex.org/klotz/2009/05/assisted-mapbinder/assisted-mapbinde...
>
> The old code 
> inhttp://groups.google.com/group/google-guice/browse_thread/thread/b1b8...
> didn't work in Guice prior to 20090205.
>
> I tried to post it to the old thread, but it's gone readonly.
>
> I don't know if it's possible to make a FactoryProvider for a Factory
> which is declared to create an object satisfying an interface, instead
> of a concrete class.  Also there's one unpleasant generic cast.
>
> Leigh.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to