return new ReportingDetectorFactorySelector( Boolean.valueOf(spanPlugins).booleanValue() ? plugin : null);
return new ReportingDetectorFactorySelector(spanPlugins ? null : plugin); } else if (categoryName.equals("training")) { return new TrainingDetectorFactorySelector(spanPlugins ? null : plugin);
	private static DetectorFactorySelector getConstraintSelector(			Element constraintElement,			Plugin plugin,			String singleDetectorElementName,			String detectorCategoryElementName) throws PluginException {		Node node = constraintElement.selectSingleNode("./" + singleDetectorElementName);		if (node != null) {			String detectorClass = node.valueOf("@class");			return new SingleDetectorFactorySelector(plugin, detectorClass);		}				node = constraintElement.selectSingleNode("./" + detectorCategoryElementName);		if (node != null) {			String categoryName = node.valueOf("@name");			String spanPlugins = node.valueOf("@spanplugins");			if (categoryName.equals("reporting")) {				return new ReportingDetectorFactorySelector(						Boolean.valueOf(spanPlugins).booleanValue() ? plugin : null);			} else {				throw new PluginException("Invalid constraint selector node");			}		}				throw new PluginException("Invalid constraint selector node");	}