Search in sources :

Example 1 with ClasspathRuleSource

use of com.buschmais.jqassistant.core.rule.api.source.ClasspathRuleSource in project jqa-core-framework by buschmais.

the class RulePluginRepositoryImpl method getRuleSources.

private List<RuleSource> getRuleSources(List<JqassistantPlugin> plugins) {
    List<RuleSource> sources = new ArrayList<>();
    for (JqassistantPlugin plugin : plugins) {
        RulesType rulesType = plugin.getRules();
        if (rulesType != null) {
            for (String resource : rulesType.getResource()) {
                String resourceName = RULE_RESOURCE_PATH + resource;
                sources.add(new ClasspathRuleSource(classLoader, resourceName));
            }
        }
    }
    return sources;
}
Also used : ClasspathRuleSource(com.buschmais.jqassistant.core.rule.api.source.ClasspathRuleSource) RuleSource(com.buschmais.jqassistant.core.rule.api.source.RuleSource) JqassistantPlugin(com.buschmais.jqassistant.core.plugin.schema.v1.JqassistantPlugin) ClasspathRuleSource(com.buschmais.jqassistant.core.rule.api.source.ClasspathRuleSource) ArrayList(java.util.ArrayList) RulesType(com.buschmais.jqassistant.core.plugin.schema.v1.RulesType)

Aggregations

JqassistantPlugin (com.buschmais.jqassistant.core.plugin.schema.v1.JqassistantPlugin)1 RulesType (com.buschmais.jqassistant.core.plugin.schema.v1.RulesType)1 ClasspathRuleSource (com.buschmais.jqassistant.core.rule.api.source.ClasspathRuleSource)1 RuleSource (com.buschmais.jqassistant.core.rule.api.source.RuleSource)1 ArrayList (java.util.ArrayList)1