久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='GgMQp'><tr id='GgMQp'><dt id='GgMQp'><q id='GgMQp'><span id='GgMQp'><b id='GgMQp'><form id='GgMQp'><ins id='GgMQp'></ins><ul id='GgMQp'></ul><sub id='GgMQp'></sub></form><legend id='GgMQp'></legend><bdo id='GgMQp'><pre id='GgMQp'><center id='GgMQp'></center></pre></bdo></b><th id='GgMQp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GgMQp'><tfoot id='GgMQp'></tfoot><dl id='GgMQp'><fieldset id='GgMQp'></fieldset></dl></div>

        <bdo id='GgMQp'></bdo><ul id='GgMQp'></ul>

    1. <legend id='GgMQp'><style id='GgMQp'><dir id='GgMQp'><q id='GgMQp'></q></dir></style></legend>

      <small id='GgMQp'></small><noframes id='GgMQp'>

      <tfoot id='GgMQp'></tfoot>
    2. 你真的在java中使用你的反向域來命名包嗎?

      Do you really use your reverse domain for package naming in java?(你真的在java中使用你的反向域來命名包嗎?)

        <tbody id='rptvf'></tbody>
      <i id='rptvf'><tr id='rptvf'><dt id='rptvf'><q id='rptvf'><span id='rptvf'><b id='rptvf'><form id='rptvf'><ins id='rptvf'></ins><ul id='rptvf'></ul><sub id='rptvf'></sub></form><legend id='rptvf'></legend><bdo id='rptvf'><pre id='rptvf'><center id='rptvf'></center></pre></bdo></b><th id='rptvf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rptvf'><tfoot id='rptvf'></tfoot><dl id='rptvf'><fieldset id='rptvf'></fieldset></dl></div>
      <tfoot id='rptvf'></tfoot>
        <bdo id='rptvf'></bdo><ul id='rptvf'></ul>

        <small id='rptvf'></small><noframes id='rptvf'>

              <legend id='rptvf'><style id='rptvf'><dir id='rptvf'><q id='rptvf'></q></dir></style></legend>
              1. 本文介紹了你真的在java中使用你的反向域來命名包嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                很久以前,我一直認為,在java中,為包命名反轉你擁有的域是愚蠢和尷尬的.

                For a long time ago, I have thought that, in java, reversing the domain you own for package naming is silly and awkward.

                您在項目中使用哪個包命名?

                Which do you use for package naming in your projects?

                推薦答案

                一旦你理解了約定為什么存在,它就不應該感到愚蠢或尷尬.

                Once you understand why the convention exists, it shouldn't feel silly or awkward in the least.

                這個方案做了兩個重要的事情:

                This scheme does two important things:

                • 您的所有代碼都包含在其他人不會與之發生沖突的包中.您擁有自己的域名,因此它是孤立的.如果我們沒有這個約定,很多公司都會有一個實用程序".包,包含StringUtil"、MessageUtil"等類等等.如果你試圖使用其他人的代碼,這些很快就會發生沖突.

                • All of your code is contained in packages that no one else will collide with. You own your domain name, so it's isolated. If we didn't have this convention, many companies would have a "utilities" package, containing classes like "StringUtil", "MessageUtil" etc. These would quickly collide if you tried to use anyone else's code.

                逆向"它的性質使得頂層的類目錄布局非常狹窄.如果您展開一個 jar,您將看到com"、org"、net"等目錄,然后在每個目錄下顯示組織/公司名稱.

                The "reverse" nature of it makes class-directory layout very narrow at the top level. If you expand a jar, you'll see "com", "org", "net", etc dirs, then under each of those the organization/company name.

                (于 2021 年添加)如今,當這種類型的包命名用于第三方庫時,這一點變得更加重要,這些庫在構建過程中被引入,并且如果名稱不是唯一的,則很容易發生沖突.如果每個人都遵守相同的約定,就不會發生意外碰撞.

                (added in 2021) This is even more important nowadays when this type of package naming is used for third-party libraries which are pulled in transitively during builds and could easily conflict if the names were not unique. If everyone adheres to the same convention, there will be no accidental collisions.

                (2021 年添加)相同的命名約定可用于應用商店中的應用程序 ID,以確保唯一性.

                (added in 2021) The same naming convention can be used for application ids on an app store to ensure uniqueness as well.

                我們通常不會擴展 jar,但在早期的 java 開發中,這很重要,因為人們使用擴展的 dir 結構來進行小程序.

                We usually don't expand jars, but in early java development, this was important because people used expanded dir structures for applets.

                但是,現在這很好,因為源代碼目錄結構具有非常自上而下"的結構.感覺.您從最通用的(com、org、net...)到不太通用的(公司名稱)再到更具體的(項目/產品/lib 名稱).

                However, this is nice now as source code dir structures have a very "top-down" feel. You go from the most general (com, org, net...) to less general (company name) to more specific (project/product/lib name).

                這篇關于你真的在java中使用你的反向域來命名包嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                How to convert Integer to int?(如何將整數轉換為整數?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                    <tbody id='YLvLN'></tbody>
                  <tfoot id='YLvLN'></tfoot>

                    <small id='YLvLN'></small><noframes id='YLvLN'>

                      <bdo id='YLvLN'></bdo><ul id='YLvLN'></ul>
                        <i id='YLvLN'><tr id='YLvLN'><dt id='YLvLN'><q id='YLvLN'><span id='YLvLN'><b id='YLvLN'><form id='YLvLN'><ins id='YLvLN'></ins><ul id='YLvLN'></ul><sub id='YLvLN'></sub></form><legend id='YLvLN'></legend><bdo id='YLvLN'><pre id='YLvLN'><center id='YLvLN'></center></pre></bdo></b><th id='YLvLN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YLvLN'><tfoot id='YLvLN'></tfoot><dl id='YLvLN'><fieldset id='YLvLN'></fieldset></dl></div>

                      • <legend id='YLvLN'><style id='YLvLN'><dir id='YLvLN'><q id='YLvLN'></q></dir></style></legend>

                          主站蜘蛛池模板: 久在线 | 精品久久久久久久久久久久 | 99精品欧美一区二区蜜桃免费 | 极品粉嫩国产48尤物在线播放 | 日韩性生活网 | 成人欧美一区二区三区黑人孕妇 | 久久午夜精品 | 亚洲视频在线一区 | 久久国产综合 | 色婷婷亚洲一区二区三区 | 国产在线视频在线观看 | 亚洲成人午夜在线 | 国产精品久久久久久影院8一贰佰 | 国产精品视频一区二区三区, | 国产激情91久久精品导航 | 91在线视频免费观看 | 不卡一二三区 | 国产欧美视频一区 | 精品欧美一区二区三区久久久 | 中文字幕乱码一区二区三区 | 国产农村妇女毛片精品久久麻豆 | 一区二区三区观看视频 | 九九热九九 | 成人免费黄视频 | 国产精品无码永久免费888 | 成人免费视频观看视频 | 亚洲国产精品人人爽夜夜爽 | 免费高清成人 | 一区二区三区在线 | 午夜一区 | 在线播放国产一区二区三区 | 亚洲一级黄色 | 日本韩国电影免费观看 | 久久精品中文字幕 | 日韩中文字幕在线观看视频 | 亚洲精品在线看 | 亚洲福利 | 国产黄色大片在线免费观看 | 日韩精品一区二区三区在线播放 | 亚洲人成人一区二区在线观看 | 久久亚洲欧美日韩精品专区 |