1 19 20 package edu.umd.cs.findbugs.plan; 21 22 import edu.umd.cs.findbugs.DetectorFactory; 23 import edu.umd.cs.findbugs.Plugin; 24 25 30 public class ReportingDetectorFactorySelector implements DetectorFactorySelector { 31 private Plugin plugin; 32 33 39 public ReportingDetectorFactorySelector(Plugin plugin) { 40 this.plugin = plugin; 41 } 42 43 46 public boolean selectFactory(DetectorFactory factory) { 47 return (plugin == null || plugin == factory.getPlugin()) 48 && factory.isReportingDetector(); 49 } 50 51 @Override 52 public String toString() { 53 String s = "All reporting detectors"; 54 if (plugin != null) { 55 s += " in plugin " + plugin.getPluginId(); 56 } 57 return s; 58 } 59 } 60 | Popular Tags |