Previous Table of Contents Next


11.3.3 Classifier


   Note – (additional properties - see “Classifier? on page 127).

   Description

   Constructs::Classifier is defined in the Classifiers diagram. A Classifier is a Type. The Classes diagram adds the association between Classifier and Property that represents the attributes of the classifier.

   Generalizations

   Attributes

   No additional attributes

   Associations

   • attribute: Property [*] Refers to all of the Properties that are direct (i.e., not inherited or imported) attributes of the classifier. Subsets Classifier::feature and is a derived union.

   Constraints

   No additional constraints

   Semantics

   All instances of a classifier have values corresponding to the classifier’s attributes.

   Semantic Variation Points

   The precise lifecycle semantics of aggregation is a semantic variation point.

   Notation

    An attribute can be shown as a text string. The format of this string is specified in the Notation subsection of “Property? on page 122.

   All redefinitions shall be made explicit with the use of a {redefines <x> } property string. Redefinition prevents inheritance of a redefined element into the redefinition context, thereby making the name of the redefined element available for reuse, either for the redefining element, or for some other.

   Presentation Options

   The type, visibility, default, multiplicity, property string may be suppressed from being displayed, even if there are values in the model.

   The individual properties of an attribute can be shown in columns rather than as a continuous string.

   The attribute compartment is often suppressed, especially when a data type does not contain attributes. The operation compartment may be suppressed. A separator line is not drawn for a missing compartment. If a compartment is suppressed, no inference can be drawn about the presence or absence of elements in it. Compartment names can be used to remove ambiguity, if necessary.

   Additional compartments may be supplied to show other predefined or user-defined model properties (for example, to show business rules, responsibilities, variations, events handled, exceptions raised, and so on). Most compartments are simply lists of strings, although more complicated formats are also possible. Appearance of each compartment should preferably be implicit based on its contents. Compartment names may be used, if needed.

   A data-type symbol with a stereotype icon may be “collapsed? to show just the stereotype icon, with the name of the data type either inside the rectangle or below the icon. Other contents of the data type are suppressed.

   Style Guidelines

   Attribute names typically begin with a lowercase letter. Multiword names are often formed by concatenating the words and using lowercase for all letters, except for upcasing the first letter of each word but the first.

   Examples


Figure 11.14 - Examples of attributes

   The attributes in Figure 11.14 are explained below.

   • ClassB::width is a derived attribute that redefines ClassA::width, which is not derived. An attribute may also be shown using association notation, with no adornments at the tail of the arrow as shown in Figure

    11.15 .


   Figure 11.15 - Association-like notation for attribute

   UML Infrastructure Specification, v2.0