Description
A package import is defined as a directed relationship that identifies a package whose members are to be imported by a
namespace.
Attributes
visibility: VisibilityKind |
Specifies the visibility of the imported PackageableElements within the importing Namespace, i.e., whether imported elements will in turn be visible to other packages that use that importingPackage as an importedPackage. If the PackageImport is public, the imported elements will be visible outside the package, while if it is private they will not. By default, the value of visibility is public. |
Associations
Constraints
[1] The visibility of a PackageImport is either public or private.
self.visibility = #public or self.visibility = #private
Semantics
A package import is a relationship between an importing namespace and a package, indicating that the importing
namespace adds the names of the members of the package to its own namespace. Conceptually, a package import is
equivalent to having an element import to each individual member of the imported namespace, unless there is already a
separately-defined element import.
Notation
A member import is shown using a dashed arrow with an open arrowhead from the importing namespace to the imported
namespace. The keyword «import» is shown near the dashed arrow.
A package import is shown using a dashed arrow with an open arrowhead from the importing package to the imported
package. A keyword is shown near the dashed arrow to identify which kind of package import that is intended. The
predefined keywords are «import» for a public package import , and «access» for a private package import.
Presentation options
As an alternative to the dashed arrow, it is possible to show an element import by having a text that uniquely identi-fies
the imported element within curly brackets either below or after the name of the namespace. The textual syntax is then:
{import <qualifiedName>} or {access <qualifiedName>}
Examples