void (@NotNull PsiMethod method) { // no call to super, so it doesn't drill down final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return; } if (aClass.isInterface() || aClass.isAnnotationType() || aClass.isRecord()) { return; } if (method.hasModifierProperty(PsiModifier.PRIVATE)) { return; } if (!SerializationUtils.isReadObject(method) && !SerializationUtils.isWriteObject(method)) { return; } if (!SerializationUtils.isSerializable(aClass)) { return; } registerMethodError(method); }