Package import (UML)

from Wikipedia, the free encyclopedia

A package Import ( package import ) is a model element in the Unified Modeling Language (UML), a language for the modeling of the structures and the behavior of software - and other systems.

A package import is a directed relationship between two packages . The elements of the imported package are transferred to the importing package in such a way that they can be used in the importing name with their simple name (see namespace ).

UML2 differentiates between two types of package imports. In the case of a public package import , the imported elements are again visible to the outside and could therefore be re-imported by a third package. In contrast, elements that are imported into a package through a private package import are only visible within the package.

notation

Notation example for a public and a private package import

The example on the left shows a public and a private package import. Both are drawn as a dependency , that is, in the form of a dashed line with an open arrowhead. Please note that the imported package is drawn with the arrowhead at the end.

Public and private package imports are differentiated with a keyword that is shown between guillemets above the arrow. For public package imports the keyword is «import», for private «access».

Differences to UML 1.4

The model element package import was new in UML2. In UML 1.4 there was a comparable concept with Dependency . The import and access rights already known there have been converted into public and private package imports in UML2. The access rights «friend»from UML 1.4 no longer exist in UML2.

See also