About this task
To
modify the features of individual ends of associations, open the Features
window for the association and make your modifications on the End1 or End2 tabs
- Name specifies the name of the element.
- L specifies the label for the element, if any. For information
about creating labels, see Assign descriptive labels to elements.
- Stereotype specifies the stereotype of the element, if
any. They are enclosed in guillemets, for example «s1» and
enable you to tag classes for documentation purposes.
- To select from a list of current stereotypes in
the project, click the Select Stereotype button
.
- To sort the order of the selected stereotypes,
click the Change Stereotype Order button
. Note: The COM stereotypes are constructive;
that is, they affect code generation.
- The Role of field is read-only. It specifies
the class, actor, or use case that plays a role in the association.
To edit the value in the Role of field, click
the Invoke Feature Dialog button
.
- Multiplicity specifies the number of occurrences of this
instance in the project. Common values are one (1),
zero or one (0,0), or one or more (1..*)
- Qualifier shows the attributes in the related class that
could function as qualifiers.
- (For IBM Rational Rhapsody Developer for C++ and IBM Rational Rhapsody Developer for Java only)
Select the Static check box if you want to mark the association
end as static. In addition, if you want to specify an initial value,
enter it in the Initial Value field.
- (For Rational Rhapsody Developer for C++ only)
Select the Reference check box if you want to generate code
for an association as a reference instead of a pointer. In addition,
if you want to specify an initial value, enter it in the Initial
Value field.
- Use the Initial Value field to enter an initial value.
For example, for static associations, if you want to initialize a
static variable generated for a static association, select the Static check
box and enter a value in the Initial value field.
Note: Initializing
a static variable for an association has priority over a reference
association, therefore, if you select the Static and
the Reference check boxes, the value in the Initial
value field is for the static variable.
For
static associations, you might also want to see the <lang>_CG::Relation::Static, <lang>_CG::Relation::InitialValue,
and CPP_CG::Relation::InitializationStyle properties,
as applicable to your edition of the product.
For
reference associations, see also the CG::Class::GenerateImplicitConstructors and CPP_CG::Relation::ScalarContainment properties.
- Aggregation Kind specifies the type of aggregation:
- None means no aggregation.
- Shared (appears as empty diamond) means shared aggregation
(whoe/part relationship).
- Composition (appears as filled diamond) means a composition
relationship. The instances of the class at this end contains instances
of the class at the other end as a part. This part cannot be contained
by other instances.
- Navigable specifies whether the association can access
the other class. Both ends of a bi-directional association are navigable.
In a directed association, the element that has the arrowhead is navigable;
the other end is not. See Modifying the features of directed associations for
more information.
- Description describes the association. To include a hyperlink
in this field, see Creating hyperlinks.