UML Structured Classifier

UML provides some mechanisms to describe a structure of interconnected elements that is created within an instance of a containing classifier. This structure is referred to as internal structure (of classifier) and is applicable both to structured classes as well as collaboration. Internal structure consists of properties, including parts, playing specific roles, and connectors.

Structured classifier is classifier having internal structure and whose behavior can be fully or partially described by the collaboration of owned or referenced instances.

Structured classifier Online Shopping with its internal structure.

Structured classifier Online Shopping with its internal structure.

UML mandatory notation connector joined directly to ports.

Simple ports joined directly by connector, mandatory UML notation.
Customers component part provides Account interface to Orders part.

The multiplicities on the structural features and connector ends indicate the number of instances (objects and links) that may be created within an instance of the containing classifier, either when the instance of the containing classifier is created, or in the case of links, when an object is added as the value of a role, or at a later time.

The lower bound of the multiplicity range indicates the number of instances that are created (unless indicated differently by an associated instance specification or an invoked constructor function); the upper bound of the multiplicity range indicates the maximum number of instances that may be created. The slots corresponding to the structural features are initialized with these instances.

The manner of creation of the containing classifier may override the default instantiation. When an instance specification is used to specify the initial instance to be created for a classifier, the multiplicities of its parts determine the number of initial instances that will be created within that classifier. Initially, there will be as many instances held in slots as indicated by the corresponding multiplicity. Multiplicity ranges on such instance specifications may not contain upper bounds.

All instances corresponding to parts of a structured classifier are destroyed recursively, when an instance of that structured classifier is deleted. The instance is removed from the extent of its classifier, and is itself destroyed. When an instance is removed from a role of a composite object, links that exist due to connectors between that role and others are destroyed.