Owned element association relationships

In Unified Modeling Language (UML) class diagrams, an owned element association relationship is a type of association that dictates ownership.

The owned element association represents classes that are owned by a package. This relationship is used to represent nested classes in a UML class diagram where a class is declared in the scope of another (outer) class. A nested class belongs to the namespace of the outer class and can only be used in the outer class. That is, the parent class declares the inner (or nested) class. This construct is primarily used for implementation reasons and for hiding information.

A declaring class and a class in its namespace are connected by an anchor line (referred to as owned association in the UML), with an anchor icon on the end connected to a declaring class. An anchor icon appears as a plus sign inside a circle. The contents of the package are declared in the class and belong to its namespace.

For example, if Class B is attached to Class A by an anchor line with the anchor symbol on Class A, Class B is declared in the namespace of Class A. That is, the relationship between Class A and Class B is the namespace-owned element association.

The following figure illustrates how owned element associations are represented in class diagrams.

Java™ source code UML visualization
The image shows the sample Java source code of owned element association relationships. The image shows how owned element association relationships are represented in UML class diagrams.
Related concepts
Adornments for unresolved references
Related tasks
Customizing queries for showing related elements
Showing related Java elements
Showing related Java elements based on outgoing relationships
Showing related Java elements based on incoming relationships
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.