pluginsFinderClass = Class.forName(pluginsFinderClassName);
}
catch (ClassNotFoundException e) {
throw new ServiceStartupException("couldn't get Class object for " + pluginsFinderClassName);
}
PluginsFinder pluginsFinder;
try {
pluginsFinder = (PluginsFinder) pluginsFinderClass.newInstance();
}
catch (Exception e) {
logger.error("while instantiating plugins finder", e);
logger.error("plugins finder must have a no-arg constructor, though there may be something else wrong");
throw new ServiceStartupException("error while instantiating plugins finder. please check logs");
}
CompositeConfigurationLoader compositeLoader = new CompositeConfigurationLoader();
Collection<? extends Plugin> plugins = pluginsFinder.get();
List<URL> pluginUrls = new ArrayList<>(plugins.size());
for (Plugin plugin : plugins) {
URL url = plugin.getClassLoaderURL();
if (url != null) {
pluginUrls.add(url);