Java package (package) naming convention, java in the package naming conventions

Reprinted:  https://blog.csdn.net/kongjiea/article/details/45365753

    Java package names are composed of lowercase words, the class name capitalized; the path of the package meets the definition developed system modules, such as the production of production, supplies of materials, base class to the base class. Package name to read to understand which module, which directly corresponds to find the corresponding package realization.

 

    Since the object-oriented characteristics of Java, every Java developers can write their own Java Package, in order to protect the uniqueness of each Java Package named in the latest Java programming specification, it requires developers to add in front of the package name their own definition the unique prefix. Since the domain name on the Internet said it was not repeated, so most developers using their own company domain name on the Internet referred to as a unique prefix own package. For example: com.sun.swt ........

 

    Thus, we know, a company named "com. Company name Project name Module name ....."
    Well, our personal project and how it named?

    After my "personal" search words, there are "individual, personal, private, one-man", further analysis of these four words meaning of the word, and to ensure the uniqueness of each word using the first four letters as a prefix, just and "com" also made a distinction. as follows:

    indi :

         Individual projects, means an individual to initiate, but not yourself alone project, the project can be public or private, copyright belongs to the main sponsors.

         Package called "indi. Initiator name Project name. Module name. ......."

    pers :

         Individual projects, means an individual to initiate, it alone can share projects, copyright belongs to the main personal.

         Package called "pers. Personal name Project name. Module name. ......."

    priv :

         Private project, means an individual to initiate alone to complete the project private use non-public, copyright belongs to the individual.

         Package named "priv. Personal name Project name. Module name. ......."

    onem:

         And "indi" the same as recommended for "indi".

 

    In addition, the distinction between what I call the project in order to distinguish between the project team and front, as well as a bit extension:

    team :

         Team project, initiated by the team refers to, by the development of the project team, copyright belongs to all the team.

         Package called "team. Team name Project name. Module name. ......."

    with :

 

 Company project, copyright owned by the company-sponsored projects.

         Package called "com. Company name Project name. Module name. ......."

Guess you like

Origin www.cnblogs.com/buyz/p/11366211.html