use of com.buschmais.jqassistant.core.plugin.schema.v1.ScannerType in project jqa-core-framework by buschmais.
the class ScannerPluginRepositoryImpl method getScannerPlugins.
private <T extends ScannerPlugin> Map<String, T> getScannerPlugins(List<JqassistantPlugin> plugins) throws PluginRepositoryException {
Map<String, T> scannerPlugins = new HashMap<>();
for (JqassistantPlugin plugin : plugins) {
ScannerType scannerType = plugin.getScanner();
if (scannerType != null) {
for (IdClassType classType : scannerType.getClazz()) {
T scannerPlugin = createInstance(classType.getValue());
if (scannerPlugin != null) {
scannerPlugin.initialize();
String id = classType.getId();
if (id == null) {
id = scannerPlugin.getClass().getSimpleName();
}
scannerPlugins.put(id, scannerPlugin);
}
}
}
}
return scannerPlugins;
}
Aggregations