private static boolean isWriteObjectMethod(@NotNull UMethod method, @Nullable RefClass refClass) {
    if (!"writeObject".equals(method.getName())) return false;
    if (method.isStatic() || method.getVisibility() != UastVisibility.PRIVATE) return false;
    List<UParameter> parameters = method.getUastParameters();
    if (parameters.size() != 1) return false;
    if (!equalsToText(parameters.get(0).getType(), "java.io.ObjectOutputStream")) return false;
    UClass aClass = UDeclarationKt.getContainingDeclaration(method, UClass.class);
    return aClass == null || isSerializable(aClass, refClass);
  }
private static boolean isWriteObjectMethod(@NotNull UMethod method, @Nullable RefClass refClass)