use of com.google.gerrit.extensions.webui.JavaScriptPlugin in project gerrit by GerritCodeReview.
the class AutoRegisterModules method makeSystemModule.
private Module makeSystemModule() {
return new AbstractModule() {
@Override
protected void configure() {
for (Class<?> clazz : sysSingletons) {
bind(clazz).in(Scopes.SINGLETON);
}
for (Map.Entry<TypeLiteral<?>, Class<?>> e : sysListen.entries()) {
@SuppressWarnings("unchecked") TypeLiteral<Object> type = (TypeLiteral<Object>) e.getKey();
@SuppressWarnings("unchecked") Class<Object> impl = (Class<Object>) e.getValue();
Annotation n = calculateBindAnnotation(impl);
bind(type).annotatedWith(n).to(impl);
}
if (initJs != null) {
DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new JavaScriptPlugin(initJs));
}
}
};
}
Aggregations