Previous UML Classes Table of Contents UML Packages Next


7.3.11 DataType

Kernel


*Generalizations

   

    Classifier (from Kernel , Dependencies , PowerTypes ) on page 51.

*Description

   A data type is a type whose instances are identified only by their value. A DataType may contain attributes to support the modeling of structured data types.

   A typical use of data types would be to represent programming language primitive types or CORBA basic types. For example, integer and string types are often treated as data types.

*Attributes

   No additional attributes

*Associations

Issue 7939 -The associations ownedAttribute and ownedOperation are ordered collections.

   • ownedAttribute: Property[*] The Attributes owned by the DataType . This is an ordered collection. Subsets Classifier::attribute and Element::ownedMember

   • ownedOperation: Operation[*] The Operations owned by the DataType . This is an ordered collection. Subsets Classifier::feature and Element::ownedMember

*Constraints

   No additional constraints

*Semantics

   A data type is a special kind of classifier, similar to a class. It differs from a class in that instances of a data type are identified only by their value.

   All copies of an instance of a data type and any instances of that data type with the same value are considered to be the same instance. Instances of a data type that have attributes (i.e., is a structured data type) are considered to be the same if the structure is the same and the values of the corresponding attributes are the same. If a data type has attributes, then instances of that data type will contain attribute values matching the attributes.

*Semantic Variation Points

   Any restrictions on the capabilities of data types, such as constraining the types of their attributes, is a semantic variation point.

*Notation

   A data type is denotated using the rectangle symbol with keyword «dataType» or, when it is referenced by (e.g., an attribute) denoted by a string containing the name of the data type.

   Examples


   size: Integer

   Figure 7.36 - Notation of data type: to the left is an icon denoting a data type and to the right is a reference to a data type that is used in an attribute.