I'm adding two Guice modules, but they both have an @Provides for the same item. They're both 3rd party modules, so I can't modify the code. How do I prevent the collision? I really need each module to use it's own provided version. I guess the equivalent of each living within it's own "scope" where it's provided items aren't visible to the other modules.
Guice.createInjector(Stage.DEVELOPMENT, Arrays.asList(moduleA, moduleB));
I've tried wrapping them in a PrivateModule, but then they don't seem to even see their own @Provides...maybe I'm not understanding how to configure a PrivateModule? I'll actually want expose one specific class from each module to to my module that I'm developing, but my first step was trying to get these two other modules to coexist.
The injector supports creation with multiple modules and it seems like provider collision would happen now and then, so presumably there's some way to deal with that I'm not groking...
Thanks,
Chris