If a binding within ModuleA depends on ClassA, then you can wrap it in a
provider:

class ModuleA extends AbstractModule {
   @Override protected void configure() {
     bind(DependsOnClassA.class).toProvider(
        new Provider<DependsOnClassA>() {
             @Inject ClassA classA;
              ....
        }
    });
}

Is this your use case?

-Fred

On Thu, Jan 13, 2011 at 6:02 PM, mchiareli <[email protected]> wrote:

> Hi Guys, I have a module that depends of some value handled by another
> module, something like:
>
> class ModuleA extends AbstractModule {
>
> public void configure() {
>
> // need to handle the ClassA here.
>
> }
>
> }
>
> class ModuleB extends AbstractModule {
>
> public void configure() {
>
> bind(ClassA.class).to(ClassAImpl.class);
>
> }
>
> }
>
> How could i do that?
>
> Thanks.
>
> --
> 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]<google-guice%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>
>

-- 
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.

Reply via email to