Apackage is a model element in the Unified Modeling Language (UML), a modeling language for software and other systems.
A package groups a set of model elements into a group and forms a namespace for them. Packages can contain other packages as subpackages. They organize a UML2 model hierarchically, analogous to file system directories, into a structure that resembles the branching of a tree.
A Package can not only be contained in another Package, but it can also import other Packages and merge with other Packages. UML refers to the first and second cases as package import, and to the third as package merge
The following two figures show two possibilities for the representation of a package. Blue texts are explanatory comments and do not belong to the notation of UML2.
UML2 notation can also be used to represent that elements belong to a package. Here are two possible representations:
- Package import
- Package Merge
- Package diagram