code: public static String format(Object value, Type type) {
          value = decode(value, type);
          switch (type.getTag()) {
          case BYTE:      return formatByte((Byte) value);
          case LONG:      return formatLong((Long) value);
          case FLOAT:     return formatFloat((Float) value);
          case DOUBLE:    return formatDouble((Double) value);
          case CHAR:      return formatChar((Character) value);
          }
          if (value instanceof String)
              return formatString((String) value);
          return value + "";
      }
docs: Returns a string representation of a constant value (given in
  internal representation), quoted and formatted as in Java source.