void (@NotNull PsiClass aClass) { if (aClass.isInterface() || aClass.isAnnotationType()) { return; } if (aClass instanceof PsiTypeParameter) { return; } final PsiClassType[] types = aClass.getExtendsListTypes(); for (final PsiClassType type : types) { if (type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) { registerClassError(aClass); } } }