static void constToString(@NotNull StringBuilder builder, @NotNull Object value, TypeInfo type, boolean anno, TypeInfoProvider mapping) {
    if (value instanceof String) {
      builder.append('"');
      StringUtil.escapeStringCharacters(((String)value).length(), (String)value, "\"", builder);
      builder.append('"');
    } else if (value instanceof Boolean || value instanceof Short || value instanceof Byte) {
      builder.append(value);
    } else if (value instanceof Character) {
      builder.append('\'');
      String s = value.toString();
      StringUtil.escapeStringCharacters(s.length(), s, "'", builder);
      builder.append('\'');
    } else if (value instanceof Long) {
      builder.append(value).append('L');
    } else if (value instanceof Integer) {
      if (type.getKind() == TypeInfo.TypeKind.BOOLEAN) {
        builder.append(value.equals(0) ? "false" : "true");
      } else if (type.getKind() == TypeInfo.TypeKind.CHAR) {
        char ch = (char)((Integer)value).intValue();
        builder.append('\'');
        String s = String.valueOf(ch);
        StringUtil.escapeStringCharacters(s.length(), s, "'", builder);
        builder.append('\'');
      } else {
        builder.append(value);
      }
    } else if (value instanceof Double) {
      double d = (Double)value;
      if (Double.isInfinite(d)) {
        builder.append(d > 0 ? DOUBLE_POSITIVE_INF : DOUBLE_NEGATIVE_INF);
      } else if (Double.isNaN(d)) {
        builder.append(DOUBLE_NAN);
      } else {
        builder.append(d);
      }
    } else if (value instanceof Float) {
      float v = (Float)value;
      if (Float.isInfinite(v)) {
        builder.append(v > 0 ? FLOAT_POSITIVE_INF : FLOAT_NEGATIVE_INF);
      }
      else if (Float.isNaN(v)) {
        builder.append(FLOAT_NAN);
      }
      else {
        builder.append(v).append('f');
      }
    } else if (value.getClass().isArray()) {
      builder.append('{');
      for (int i = 0, length = Array.getLength(value); i < length; i++) {
        if (i > 0) builder.append(", ");
        constToString(builder, Array.get(value, i), type, anno, mapping);
      }
      builder.append('}');
    } else if (anno && value instanceof Type) {
      toJavaType(builder, (Type)value, mapping);
      builder.append(".class");
    } else {
      builder.append("null");
    }
  }
static void constToString(@NotNull StringBuilder builder, @NotNull Object value, TypeInfo type, boolean anno, TypeInfoProvider mapping)