Comment #15 on issue 131 by gili.tzabari: partial injection a.k.a. factory  
generation
http://code.google.com/p/google-guice/issues/detail?id=131

Why it is important to annotate which parameters come from the user and  
which from
the Guice Module? My only beef against both FactoryModule and  
FactoryProvider is that
they don't totally do away with the CRUD needed to make this work. I still  
haven't
made up on mind on this point but I'm leaning towards "the less  
differentiation
between Guice-provider and User-provider parameters, the better".

The way I see it, there should be two sets of arguments at any injection  
point:
global (Guice module) bindings and local (user-provided) bindings.  
User-provided
bindings would act as overrides to the global bindings. At any given  
injection point,
Guice would try to provide all parameters that need to be injected. If it  
can't
figure out how to inject a parameter from either set then it should throw an
exception. Otherwise, it should pull values from the override set first,  
and global
set second.

If you generalize this enough, it should be possible to do away with the  
CRUD
factories altogether.

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to