private static void writeVisibility(Element node,
                                      String type,
                                      String visibility,
                                      String defaultVisibility) {
    if (!defaultVisibility.equals(visibility)) {
      node.setAttribute(type, visibility);
    }
  }
private static void writeVisibility(Element node,
                                      String type,
                                      String visibility,
                                      String defaultVisibility)