![]() |
![]() |
![]() |
![]() |
Class Specification--Detail Tab Class Specification--Detail Tab
Figure 19 Class Specification--Detail Tab
Refer to the descriptions in the Introduction to Specifications chapter for information on the specification elements not covered in the following section.
Cardinality
The Cardinality field specifies the number of expected instances of the class. In the case of relationships, this field indicates the number of links between each instance of the client class and the instance of the supplier. You can set a specific cardinality value for the client class, supplier class, or both.
Use the following syntax to express cardinality.
1 Where <literal> is any integer greater than or equal to one.
To display class cardinality on an icon, right-click the icon and select a cardinality through the shortcut menu. A literal value can only be specified on the specification.
Space
Use the Space field to document the amount of storage required by objects of the class during execution.
Persistence
Persistence defines the lifetime of the instances of a class. A persistent element is expected to have a life span beyond that of the program or one that is shared with other threads of control or other processes. Use this field to identify the persistence for elements of this class.
The persistence of an element must be compatible with the persistence that you specified for its class. If a class persistence is set to Persistent, then the object persistence is either persistent, static, or transient. If a class persistence is set to Transient, then the object persistence is either static or transient.
You can set the persistence only through the specification. This field is inactive for class utilities, parameterized class utilities, and instantiated class utilities.
To set the persistence, click the applicable option in the Persistence field. You can display the persistence in the diagram by clicking Show Persistence from the shortcut menu.
Concurrency
A class concurrency defines its semantics in the presence of multiple threads of control.
Abstract
The Abstract check box identifies a class that serves as a base class. An abstract class defines operations and states that will be inherited by subclasses. This field corresponds to the abstract class adornment displayed inside the class icon.
To toggle the abstract adornment, select or clear the abstract check box in the Class Specification.
When you click Abstract and you view the model in Booch notation, the abstract class adornment is displayed in the lower left corner of the class icon.
You can change the abstract class adornment only through the specification.
The Abstract field is inactive for metaclasses, class utilities, parameterized class utilities, and instantiated class utilities.
Formal Arguments
In the Parameterized Class or Parameterized Class Utility Specification, the formal, generic parameters declared by the class or class utility are listed.
In the Instantiated Class or Instantiated Class Utility Specification, the actual arguments that match the generic parameters of the class being instantiated are listed.
You can add, update, or delete parameters only through the Class Specification. This field applies only to parameterized classes, parameterized class utilities, instantiated classes, and instantiated class utilities.
To define the parameters for a class, position the pointer within the Parameters field and click Insert from the shortcut menu or press the insert key.
Rational Software Corporation
http://www.rational.com support@rational.com docs@us.ibm.com Copyright © 1993-2000, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |