Changing Guice bindings at runtime
问题 I would like to be able to change the Guice injections at runtime to support multiple injections based on user input. This is what I would like to achieve: public interface IDao { public int someMethod(); } public class DaoEarth implements IDao { @Override public int someMethod(){ ... } } public class DaoMars implements IDao { @Override public int someMethod(){ ... } } public class MyClass { @Inject private IDao myDao; public int myMethod(String domain) { //If Domain == Earth, myDao should be