Thomas,

I'm working on restructuring AppActivityMapper so that I inject in the 
Activities.  My reasoning for the static injector was it kept me from 
having gigantic constructor arguments.  If AppActivityMapper has 30 
activities, that's alot of constructor arguments.  

MyApp.getInjector().getActivityFoo()  seemed like a very clean way to get 
around that.  I get that it breaks injection though.  

I could pass in the injector but I suspect that's bad form as well ;)

I could have injected fields, but that's pretty heavily frowned upon, but 
it sure makes for more readable code.  Any options?  How about a Provider 
that can provide mutliple classes.

Something like
Provider<Activity> parentProvider
that could return  child classes?  From reading the Guice docs that doesn't 
seem it would work.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/sgjxUSjgn5cJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to