Where do I put the creation logic when using BindingAnnotation or
AssistedInject? The logic is:
if(type == 1){
return new Imple1();
}else if(type ==2){
return new Imple2();
}
Thanks.
On Aug 9, 11:00 pm, "Dhanji R. Prasanna" <[email protected]> wrote:
> You could use binding annotations to distinguish the two impls at the call
> site, or AssistedInject will let you use the same type of factory, but with
> Guice providing the
> injection.http://code.google.com/p/google-guice/wiki/BindingAnnotationshttp://code.google.com/p/google-guice/wiki/AssistedInject
>
> Dhanji.
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---