You might want to take a look at Modules#override[1] and
PrivateModule[2].

Cheers
Alen

[1] 
http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/util/Modules.html#override(com.google.inject.Module...)
[2] 
http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/PrivateModule.html

On Oct 5, 1:42 pm, jbenckert <[email protected]> wrote:
> Hi All,
>
> I need to decide on the type to be instantiated based on some
> information which cannot be determined until runtime.  My application
> may need to override some of the dependencies in the chain based on
> what "mode" it's in.
>
> I toyed with using providers for this but using a provider actually
> breaks the dependency chain, as far as I can tell.  In all the
> examples the objects are actually getting built by hand and not by the
> container.  I guess that's the idea with the providers as they're used
> when actually configuring a container.
>
> I could wrap guice and manage multiple containers for each "mode" of
> the application, but I'm wondering if there isn't a better way to do
> this.
>
> Thanks
>
> -Joe

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