Is there any way to control Guice's object creation order. Another way of 
asking this is: is there a way to dynamically add a dependency to a class. 

Here's a scenario. Class Foo should not be created until Class Bar is 
created. One way of ensuring this is to add a ref to Bar to Foo's 
constructor:

public class Foo {

Foo(Bar b);


But if no methods of Bar are used by Foo it seems like a contrivance. Is 
there a way to tell Guice (at binding time) that Foo depends on Bar?


 

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/Fwru_-rPrXQJ.
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