Names of classifier roles
A classifier role (instance line) with a class name is
a view of the class in the model. An instance line with an instance
name (of the form instance:class
) is also a view
of the class in the model.
Instance lines reference classes in the model. If you rename an instance line to another class name that exists in the model, the line acts as a view to the other class in the model. If the class does not exist, Rhapsody® will create it.
If you specified analysis mode, the product names
the instance line role_n
by default and does not
prompt you for class information. The following figure shows a new
instance line in an analysis sequence diagram.
If you specified design mode, the product names the instance line
:class_n
by default. If the specified class does not exist, Rhapsody asks if
you want to create it. The following figure shows a new instance line in a design sequence
diagram.
Classifier role names are animated when their expression can be mapped to an existing object.
Examples:
We have a class A
and an object a:A
who
is the only object of A
. All the following names
will be mapped to it:
:A
a:A
A[0]:A
A[#0]:A
Suppose that instead of a:A
, we
have a single instance of A
as a part itsA
of
another object b:B
.
The instance line can be named as:
:A
b->itsA:A
B[0]->itsA:A
A[#0]:A
B[#0]->itsA->a:A