void (@NotNull PsiClass aClass) { // no call to super, so that it doesn't drill down to inner classes if (!UtilityClassUtil.isUtilityClass(aClass)) { return; } if (!hasPublicConstructor(aClass)) { return; } final SearchScope scope = GlobalSearchScope.projectScope(aClass.getProject()); final Query<PsiClass> query = ClassInheritorsSearch.search(aClass, scope, false); final PsiClass subclass = query.findFirst(); Boolean hasInheritors = subclass != null; registerClassError(aClass, aClass, hasInheritors); }