use of com.google.gwt.inject.rebind.adapter.GinModuleAdapter in project gwt-test-utils by gwt-test-utils.
the class GInjectorCreateHandler method readGuiceModules.
private Set<Module> readGuiceModules(Class<? extends GinModule>[] classLiterals, Class<? extends Ginjector> ginectorClass) throws Exception {
Set<Module> modules = new HashSet<>();
for (Class<? extends GinModule> literal : classLiterals) {
LOGGER.debug("wrapping GinModule literal " + literal);
MemberCollector memberCollector = new MemberCollector(GwtTreeLogger.get());
GuiceUtil guiceUtil = new GuiceUtil(memberCollector);
modules.add(new GinModuleAdapter(literal.newInstance(), new GinjectorBindings(null, GwtTreeLogger.get(), guiceUtil, ginectorClass, null, memberCollector, null, null)));
}
return modules;
}
Aggregations