for (Edge edge: directEdges) {
if (!useSee && edge.getType() == SEE_ALSO) {
continue;
}
ClassDoc source = (ClassDoc) edge.getSource();
ClassDoc target = (ClassDoc) edge.getTarget();
boolean excluded = false;
if (forceInherit || cls.tags(TAG_INHERIT).length > 0) {
for (Tag t: pkg.tags(TAG_EXCLUDE)) {
if (t.text() == null || t.text().trim().length() == 0) {
continue;
}
Pattern p = Pattern.compile(t.text().trim());
if (p.matcher(source.qualifiedName()).find()) {
excluded = true;
break;
}
if (p.matcher(target.qualifiedName()).find()) {
excluded = true;
break;
}
}
if (excluded) {
continue;
}
}
for (Tag t: cls.tags(TAG_EXCLUDE)) {
if (t.text() == null || t.text().trim().length() == 0) {
continue;
}
Pattern p = Pattern.compile(t.text().trim());
if (p.matcher(source.qualifiedName()).find()) {
excluded = true;
break;
}
if (p.matcher(target.qualifiedName()).find()) {
excluded = true;
break;
}
}
if (excluded) {
continue;
}
if (!useHidden || !isHidden(source) && !isHidden(target)) {
edgesToRender.add(edge);
}
if (!useHidden || !isHidden(source)) {
nodesToRender.put(source.qualifiedName(), source);
}
if (!useHidden || !isHidden(target)) {
nodesToRender.put(target.qualifiedName(), target);
}
}
Set<Edge> reversedDirectEdges = reversedEdges.get(cls);
if (reversedDirectEdges != null) {
for (Edge edge: reversedDirectEdges) {
if (!useSee && edge.getType() == SEE_ALSO) {
continue;
}
if (cls.tags(TAG_EXCLUDE_SUBTYPES).length > 0 &&
(edge.getType() == EdgeType.GENERALIZATION ||
edge.getType() == EdgeType.REALIZATION)) {
continue;
}
ClassDoc source = (ClassDoc) edge.getSource();
ClassDoc target = (ClassDoc) edge.getTarget();
boolean excluded = false;
if (forceInherit || cls.tags(TAG_INHERIT).length > 0) {
for (Tag t: pkg.tags(TAG_EXCLUDE)) {
if (t.text() == null || t.text().trim().length() == 0) {
continue;
}
Pattern p = Pattern.compile(t.text().trim());
if (p.matcher(source.qualifiedName()).find()) {
excluded = true;
break;
}
if (p.matcher(target.qualifiedName()).find()) {
excluded = true;
break;
}
}
if (excluded) {
continue;
}
}
for (Tag t: cls.tags(TAG_EXCLUDE)) {
if (t.text() == null || t.text().trim().length() == 0) {
continue;
}
Pattern p = Pattern.compile(t.text().trim());
if (p.matcher(source.qualifiedName()).find()) {
excluded = true;
break;
}
if (p.matcher(target.qualifiedName()).find()) {
excluded = true;
break;
}
}
if (excluded) {
continue;
}
if (!useHidden || !isHidden(source) && !isHidden(target)) {
edgesToRender.add(edge);
}
if (!useHidden || !isHidden(source)) {
nodesToRender.put(source.qualifiedName(), source);
}
if (!useHidden || !isHidden(target)) {
nodesToRender.put(target.qualifiedName(), target);
}
}
}
}
}