use of com.google.gwt.inject.rebind.util.MemberCollector in project google-gin by gwtplus.
the class FactoryBindingTest method createInjectableCollector.
// Lifted from GuiceUtilTest
private MemberCollector createInjectableCollector() {
MemberCollector collector = new MemberCollector(TreeLogger.NULL);
collector.setMethodFilter(new MemberCollector.MethodFilter() {
public boolean accept(MethodLiteral<?, Method> method) {
return method.isAnnotationPresent(Inject.class) && !method.isStatic();
}
});
collector.setFieldFilter(new MemberCollector.FieldFilter() {
public boolean accept(FieldLiteral<?> field) {
return field.isAnnotationPresent(Inject.class) && !field.isStatic();
}
});
return collector;
}
use of com.google.gwt.inject.rebind.util.MemberCollector 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