use of org.jqassistant.schema.plugin.v1.ClassListType in project jqa-core-framework by buschmais.
the class ScannerPluginRepositoryImpl method getScopes.
private Map<String, Scope> getScopes(List<JqassistantPlugin> plugins) {
Map<String, Scope> scopes = new HashMap<>();
for (JqassistantPlugin plugin : plugins) {
ClassListType scopeTypes = plugin.getScope();
if (scopeTypes != null) {
for (String scopePluginName : scopeTypes.getClazz()) {
Class<? extends Enum<?>> type = getType(scopePluginName);
for (Enum enumConstant : type.getEnumConstants()) {
Scope scope = (Scope) enumConstant;
String scopeName = scope.getPrefix() + ":" + scope.getName();
scopes.put(scopeName.toLowerCase(), scope);
}
}
}
}
return scopes;
}
Aggregations