in src/main/org/apache/ant/antunit/AntUnit.java [637:653]
public void addMatchingReferences(Hashtable<String, Object> src, Collection<String> dest) {
String id = getRefId();
if (id != null) {
if (src.containsKey(id)) {
dest.add(id);
}
} else if (matcher != null) {
for (String refid : src.keySet()) {
if (matcher.matches(refid)) {
dest.add(refid);
}
}
} else {
throw new BuildException(
"either the refid or regex attribute is required for reference elements");
}
}