void (@NotNull PsiClass aClass) { // no call to super, so that it doesn't drill down to inner classes if (aClass.hasModifierProperty(PsiModifier.ABSTRACT)) { return; } if (!UtilityClassUtil.isUtilityClass(aClass)) { return; } if (ignoreClassesWithOnlyMain && hasOnlyMain(aClass)) { return; } if (hasPrivateConstructor(aClass)) { return; } if (AnnotationUtil.isAnnotated(aClass, ignorableAnnotations, 0)) { return; } if (aClass.hasModifierProperty(PsiModifier.PRIVATE) && aClass.getConstructors().length == 0) { return; } final SearchScope scope = GlobalSearchScope.projectScope(aClass.getProject()); final Query<PsiClass> query = ClassInheritorsSearch.search(aClass, scope, true); final PsiClass subclass = query.findFirst(); if (subclass != null) { return; } registerClassError(aClass, aClass); }