据我所知,它不受支持.
回答你的评论:
如果你正在运行"纯"JUnit测试(不是GWTTestcases)你不使用GIN,你使用Guice,而在Guice中你可以覆盖模块.如果要重用GIN模块,请使用它们进行包装GinModuleAdapter
.所以你可以这样做:
static class MyGinModule extends GinModule {
...
}
static class MyGuiceModule extends AbstractModule {
...
}
// And somewhere in your code, here's how you could create the Injector
Module myWrappedGinModule = new GinModuleAdapter(new MyGinModule());
Module myModule = Modules.override(myWrappedGinModule).with(new MyGuiceModule());
Injector injector = Guice.createInjector(myModule);
Run Code Online (Sandbox Code Playgroud)