@Override
    public void visitMethod(@NotNull PsiMethod method) {
      super.visitMethod(method);
      PsiClass psiClass = MissingSerialAnnotationInspection.getSerializablePsiClass(method);
      if (psiClass == null || !psiClass.isRecord()) return;

      if (SerializationUtils.isExternalizable(psiClass) && method.hasModifierProperty(PsiModifier.PUBLIC) &&
          (SerializationUtils.isReadExternal(method) ||
           SerializationUtils.isWriteExternal(method))) {
        registerMethodError(method, method);
      }
      else if (SerializationUtils.isSerializable(psiClass) && method.hasModifierProperty(PsiModifier.PRIVATE) &&
               (SerializationUtils.isWriteObject(method) ||
                SerializationUtils.isReadObject(method) ||
                SerializationUtils.isReadObjectNoData(method))) {
        registerMethodError(method, method);
      }
    }
@Override
    public void visitMethod(@NotNull PsiMethod method)