Owned element association relationships
In Unified Modeling Language (UML) visualization 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.
Java source code UML visualization
![]()
![]()
Parent topic
Relationships
Related concepts
Association relationships
Dependency relationships
Extends relationships
Implements relationships
Related tasks
Showing related Java elements
Showing related Java elements based on outgoing relationships
Showing related Java elements based on incoming relationships