private int getSuperInterfaceCount(ClassNode element) { int count = 1; ClassNode[] interfaces = element.getInterfaces(); for (ClassNode anInterface : interfaces) { count = Math.max(count, getSuperInterfaceCount(anInterface) + 1); } return count; }