Attribute dialog box

 

Attributes

An attribute specifies a primitive property of a class.  Its value is shared by all the instances of the class.  It is characterized by a name, a type, and, optionally, by a default value.

 

An attribute can be:

·         a class attribute, in which case it is related to the class itself.

·         an instance attribute, in which case it belongs to each of the class instances.  Its value is particular to a given instance.

·         a functional dependency attribute, in which case its value depends on other values (for example other attributes).  It is dynamically evaluated.

 

The "Attribute" dialog box contains four tabs - "Properties", "Notes", "Tagged values" and "Stereotypes".  For information on these standard dialog box tabs, please see "Standard dialog box tabs".

 

 

The "Properties" tab of the "Attribute" dialog box

The "Properties" tab of the "Attribute" dialog box is used to define values for an attribute.

 

The "Properties" tab of the "Attribute" dialog box

 

Key:

·         "Name": This is the attribute's name.

·         "Visibility": This is the visibility of the attribute (undefined, public, protected or private).

·         "Class": This determines which class will give a type to the attribute.  A list selects those classes that are "primitive" and that are accessible by the current class.

·         "Is class": This determines whether the attribute is static or not.

·         "Type constraint/String size": This is used to indicate the size of string-type attribute, and gives an indication of instantiation of the attribute’s primitive class.

·         "Abstract": This indicates whether the attribute is abstract or not.

·         "Expression of value": If the attribute is a dynamic dependency, then this field will contain the expression of the dynamic calculation in the target language (such as C++ or Java).  If not, the associated field contains the attribute’s default value.

·         "Min" and "Max": These determine the minimum and maximum values of the attribute.

·         "Dynamic dependency": This determines whether the attribute is a dynamic dependency, i.e. whether its value is calculated dynamically through an expression.  This also corresponds to the "derived" attributes.

·         "Ordered": This indicates whether the attribute is ordered or not.

·         "Unique": This indicates whether the attribute is unique or not.

·         "Access mode": This determines the access mode of the attribute (read, write, read/write or neither).

·         "Target is class": This indicates that the attribute type is a metaclass.