docs: public static boolean isValidName(String name) {
      final int length = name.length();
      if (length == 0) {
        return false;
      }
      char ch = name.charAt(0);
      if (!isNameStart(ch)) {
        return false;
      }
      for (int i = 1; i < length; ++i) {
        ch = name.charAt(i);
        if (!isName(ch)) {
          return false;
        }
      }
      return true;
    }