for (Plugin plugin : pluginLoader.loadPlugins())
pluginModules.addAll(plugin.modules());
LOG.debug("Loaded modules: " + pluginModules);
GuiceInstantiationService instantiationService = new GuiceInstantiationService();
List<Module> bindingsModules = getBindingsModules(instantiationService,
new RadioBindings(configuration),
new RadioInitializerBindings());
LOG.debug("Adding plugin modules: " + pluginModules);
bindingsModules.addAll(pluginModules);
final Injector injector = GuiceInjectorHolder.createInjector(bindingsModules);
instantiationService.setInjector(injector);
// This is holding all our metrics.
final MetricRegistry metrics = injector.getInstance(MetricRegistry.class);
// Report metrics via JMX.