Search in sources :

Example 1 with DetectDetectableFactory

use of com.synopsys.integration.detect.tool.detector.factory.DetectDetectableFactory in project synopsys-detect by blackducksoftware.

the class HelpJsonManager method createHelpJsonDetectorList.

private List<HelpJsonDetector> createHelpJsonDetectorList(boolean buildless) {
    DetectorRuleFactory ruleFactory = new DetectorRuleFactory();
    // TODO: Is there a better way to build a fake set of rules?
    DetectDetectableFactory mockFactory = new DetectDetectableFactory(null, null, null, null, null, null, null, null);
    DetectorRuleSet ruleSet = ruleFactory.createRules(mockFactory, buildless);
    return ruleSet.getOrderedDetectorRules().stream().map(detectorRule -> convertDetectorRule(detectorRule, ruleSet)).collect(Collectors.toList());
}
Also used : Arrays(java.util.Arrays) List(java.util.List) DetectDetectableFactory(com.synopsys.integration.detect.tool.detector.factory.DetectDetectableFactory) DetectableInfo(com.synopsys.integration.detectable.detectable.annotation.DetectableInfo) DetectorRule(com.synopsys.integration.detector.rule.DetectorRule) Gson(com.google.gson.Gson) Detectable(com.synopsys.integration.detectable.Detectable) DetectorRuleFactory(com.synopsys.integration.detect.tool.detector.DetectorRuleFactory) Optional(java.util.Optional) DetectorRuleSet(com.synopsys.integration.detector.rule.DetectorRuleSet) Collectors(java.util.stream.Collectors) DetectProperties(com.synopsys.integration.detect.configuration.DetectProperties) DetectorRuleFactory(com.synopsys.integration.detect.tool.detector.DetectorRuleFactory) DetectDetectableFactory(com.synopsys.integration.detect.tool.detector.factory.DetectDetectableFactory) DetectorRuleSet(com.synopsys.integration.detector.rule.DetectorRuleSet)

Aggregations

Gson (com.google.gson.Gson)1 DetectProperties (com.synopsys.integration.detect.configuration.DetectProperties)1 DetectorRuleFactory (com.synopsys.integration.detect.tool.detector.DetectorRuleFactory)1 DetectDetectableFactory (com.synopsys.integration.detect.tool.detector.factory.DetectDetectableFactory)1 Detectable (com.synopsys.integration.detectable.Detectable)1 DetectableInfo (com.synopsys.integration.detectable.detectable.annotation.DetectableInfo)1 DetectorRule (com.synopsys.integration.detector.rule.DetectorRule)1 DetectorRuleSet (com.synopsys.integration.detector.rule.DetectorRuleSet)1 Arrays (java.util.Arrays)1 List (java.util.List)1 Optional (java.util.Optional)1 Collectors (java.util.stream.Collectors)1