void (@NotNull PsiClass aClass) { // no call to super, so it doesn't drill down if (aClass.isInterface() || aClass.isAnnotationType() || aClass.isEnum() || aClass.isRecord()) { return; } if (aClass instanceof PsiTypeParameter) { return; } if (inspection.ignoreAnonymousInnerClasses && aClass instanceof PsiAnonymousClass) { return; } if (aClass.findFieldByName(HardcodedMethodConstants.SERIAL_VERSION_UID, false) != null) { return; } final PsiClass containingClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class); if (containingClass == null) { return; } if (aClass.hasModifierProperty(PsiModifier.STATIC)) { return; } final PsiModifierListOwner staticElement = PsiUtil.getEnclosingStaticElement(aClass, containingClass); if (staticElement != null) { return; } if (!SerializationUtils.isSerializable(aClass)) { return; } if (inspection.isIgnoredSubclass(aClass)) { return; } registerClassError(aClass); }