String categoryName = node.valueOf("@name");
if (!categoryName.equals("")) {
if (categoryName.equals("reporting")) {
return new ReportingDetectorFactorySelector(spanPlugins ? null : plugin);
} else if (categoryName.equals("training")) {
return new ByInterfaceDetectorFactorySelector(spanPlugins ? null : plugin, TrainingDetector.class);
} else if (categoryName.equals("interprocedural")) {
return new ByInterfaceDetectorFactorySelector(spanPlugins ? null : plugin,
InterproceduralFirstPassDetector.class);
} else {
throw new PluginException("Invalid category name " + categoryName + " in constraint selector node");
}
}
}
node = constraintElement.selectSingleNode("./" + singleDetectorElementName + "Subtypes");
if (node != null) {
boolean spanPlugins = Boolean.valueOf(node.valueOf("@spanplugins")).booleanValue();
String superName = node.valueOf("@super");
if (!superName.equals("")) {
try {
Class<?> superClass = Class.forName(superName);
return new ByInterfaceDetectorFactorySelector(spanPlugins ? null : plugin, superClass);
} catch (ClassNotFoundException e) {
throw new PluginException("Unknown class " + superName + " in constraint selector node");
}
}
}