boolean (PsiClass anInterface, Set<? super PsiClass> visitedInterfaces) { if (!visitedInterfaces.add(anInterface)) { return true; } if (anInterface.getAllFields().length == 0) { // ignore it, it's either a true interface or just a marker return false; } if (anInterface.getMethods().length != 0) { return false; } final PsiClass[] parentInterfaces = anInterface.getInterfaces(); for (final PsiClass parentInterface : parentInterfaces) { if (!interfaceContainsOnlyConstants(parentInterface, visitedInterfaces)) { return false; } } return true; }