Map<Method,MethodModel> annotatedLeafMethods = classModel.getAnnotatedLeafMethods(ann);
StringBuilder b = new StringBuilder();
for (Map.Entry<Method,MethodModel> e : annotatedLeafMethods.entrySet()) {
if (verify(e.getKey())) {
MethodModel mm = e.getValue();
if (mm.getDown() != null || mm.getUp() != null) {
b.append("Methods annotated with @" + ann.getName() + " shadow or override each other:\n");
while (mm.getUp() != null) {
mm = mm.getUp();
}
while (mm != null) {
b.append(" - ");
if (mm.element.isAnnotationPresent(ann)) b.append("@").append(ann.getSimpleName()).append(" ");
b.append(signature(mm.element)).append("\n");
mm = mm.getDown();
}
}
}
}