public synchronized List<Class<?>> getExtensionClasses(String pluginId) {
List<Class<?>> list = new ArrayList<Class<?>>();
PluginClassLoader loader = pf4j.getPluginClassLoader(pluginId);
for (String className : pf4j.getExtensionClassNames(pluginId)) {
try {
list.add(loader.loadClass(className));
} catch (ClassNotFoundException e) {
logger.error(String.format("Failed to find %s in %s", className, pluginId), e);
}
}
return list;