Previous Table of Contents Next


9.21.2 VisibilityKind


   VisibilityKind is an enumeration type that defines literals to determine the visibility of elements in a model.

   Generalizations

   • None

   Description

   VisibilityKind is an enumeration of the following literal values:

   Additional Operations

   [1] The query bestVisibility() examines a set of VisibilityKinds, and returns public as the preferred visibility.

   VisibilityKind::bestVisibility(vis: Set(VisibilityKind)) : VisibilityKind;bestVisibility = if vis->includes(#public) then #public else #private endif

   Semantics

   VisibilityKind is intended for use in the specification of visibility in conjunction with, for example, the Imports, Generalizations, and Packages packages. Detailed semantics are specified with those mechanisms. If the Visibility package is used without those packages, these literals will have different meanings, or no meanings.

   In circumstances where a named element ends up with multiple visibilities, for example by being imported multiple times, public visibility overrides private visibility, i.e., if an element is imported twice into the same namespace, once using public import and once using private import, it will be public.