You could make a third module which checks the version and then delegates all 
method calls to the either 1.0 or 1.1

Am 28. September 2015 06:29:57 WESZ, schrieb Amit Sonkar 
<[email protected]>:
>I am working on a struts2 project in which guice is used for dependency
>
>injection. Now i have a java project in which services are written for
>1.0 
>version and 1.1 version like below.
>
>public interface Services
>{
>   public void meth1();
>}
>
>public class ServiceImpl1_0 implements Services
>{
>   public void meth1()
>   {
>   }
>}
>
>public class ServiceImpl1_1 implements Services
>{
>   public void meth1()
>   {
>   }
>}
>
>I created two guice modules, one to inject 1_0 version and another to 
>inject 1_1 version.
>
>This project is consumed in main project where i have to inject the 
>dependency based on the version number like 
>
>if version 1.0 then install 1_0 guice module else install 1_1 guice
>module.
>
>Please help me how can i achieve it?
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "google-guice" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to [email protected].
>To post to this group, send email to [email protected].
>Visit this group at http://groups.google.com/group/google-guice.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/google-guice/1b657c2d-214f-4313-9874-2a22b55c0d16%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/F7EC2DD2-30DD-47C0-A658-82823BBF1199%40gmx.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to