Element import relationships
An element import relationship is a direct relationship between an importing namespace and a package able element. The name of the package able element, or its alias, is added to the namespace of the importing namespace. You can also control whether the imported element can be further imported.
An element import relationship works by reference, which means that you can not add features to the element import relationship itself, but you can modify the referenced element in the namespace from which it was imported. This reference provides an access control mechanism.
The element that is imported becomes a visible element of the importing package under its imported name. The element import relationship adds the element to the namespace without making it public in the importing package. For example, if Package3 imports the element name from Package2, then name appears in Package3.
You can use element import relationships to selectively import individual elements without relying on a package import. However, the importing package can only import elements that have a visibility set to public.
As the following figure illustrates, a element import relationship is displayed in the diagram editor as a dashed line with an open arrow that points from the imported namespace to the imported element package. The keyword «elementimport» is attached to the connector.
No comments:
Post a Comment