public class Module1 extends AbstractModule {
private Map<String, Object> constrArgToPass = new HashMap<>();
public Module1() {
}
public Module1(@NonNull final Map<String, Object> constrArgToPass) {
this.constrArgToPass = constrArgToPass;
}
}
public class Module2 extends AbstractModule {
@Override
protected void configure() {
install(new Module1(constrArgToPass));
}
@Provides
@Singleton
Map getConstrArgToPass() {
}
}
如何将提供程序返回的constrargtopass传递给需要在configure方法中安装的另一个模块的构造函数arg?
暂无答案!
目前还没有任何答案,快来回答吧!