したがって、私のテストによると、次のようなものがある場合:
Module modA = new AbstractModule() {
public void configure() {
bind(A.class).to(AImpl.class);
bind(C.class).to(ACImpl.class);
bind(E.class).to(EImpl.class);
}
}
Module modB = New AbstractModule() {
public void configure() {
bind(A.class).to(C.class);
bind(D.class).to(DImpl.class);
}
}
Guice.createInjector(Modules.overrides(modA, modB)); // gives me binding for A, C, E AND D with A overridden to A->C.
しかし、modB で E のバインドを削除したい場合はどうすればよいでしょうか? E のバインドを別のモジュールに分割することなく、これを行う方法を見つけることができないようです。方法はありますか?