Search in sources :

Example 1 with GinModuleAdapter

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;
}
Also used : GinjectorBindings(com.google.gwt.inject.rebind.GinjectorBindings) GuiceUtil(com.google.gwt.inject.rebind.util.GuiceUtil) GinModuleAdapter(com.google.gwt.inject.rebind.adapter.GinModuleAdapter) Module(com.google.inject.Module) GinModule(com.google.gwt.inject.client.GinModule) MemberCollector(com.google.gwt.inject.rebind.util.MemberCollector) HashSet(java.util.HashSet)

Aggregations

GinModule (com.google.gwt.inject.client.GinModule)1 GinjectorBindings (com.google.gwt.inject.rebind.GinjectorBindings)1 GinModuleAdapter (com.google.gwt.inject.rebind.adapter.GinModuleAdapter)1 GuiceUtil (com.google.gwt.inject.rebind.util.GuiceUtil)1 MemberCollector (com.google.gwt.inject.rebind.util.MemberCollector)1 Module (com.google.inject.Module)1 HashSet (java.util.HashSet)1