Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition
by Craig Larman
18.2. Visibility
In common usage, visibility is the ability of an object to “see” or have a reference to another object. More generally, it is related to the issue of scope: Is one resource (such as an instance) within the scope of another? There are four common ways that visibility can be achieved from object A to object B:
Attribute visibility— B is an attribute of A.
Parameter visibility— B is a parameter of a method of A.
Local visibility— B is a (non-parameter) local object in a method of A.
Global visibility— B is in some way globally visible.
The motivation to consider visibility is this:
|
For an object A to send a message to an object B, B must be visible to A. |
For example, to create an interaction diagram in which a message is sent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access