If it is a singleton you can ask the injector for it by its class. If it isn't 
a singleton you might need to traverse the graph or use a provider to capture 
the instance. You could also use a proxy to capture it. 

Sent from my iPad

On Sep 24, 2011, at 4:31 PM, kalithlev <[email protected]> wrote:

> I'm just starting with DI and Guice, so forgive me if this is a stupid
> question.
> 
> How can I get a hold of an instance deep in the object graph after
> creating the graph? I need to configure an instance on runtime
> (basically just calling a setter).
> 
> -- 
> 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.
> 

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