background image
<< Using Activations | Destruction Markers >>
<< Using Activations | Destruction Markers >>

Using Classifier Roles

Product Overview
Using Classifier Roles
Classifier roles can appear on a model to represent the following:
·
In models depicting role-based interactions, a classifier role represents an
instance in an interaction. Using classifier roles instead of objects can provide
two advantages: First, a class can serve as the base classifier for multiple
classifier roles. Second, instances of a class can realize multiple classifier roles in
one or more collaborations.
·
In models depicting patterns, a classifier role specifies the kind of object that
must ultimately fulfill a role in the pattern. The classifier role shows how the
object will participate in the pattern, and its reference to a base class defines the
attributes and operations that are required for participation in the pattern.
When the pattern is used in the model, classes are bound to the collaboration to
identify the type of objects that realize the classifier roles.
The classifier roles in a model are usually contained in a collaboration and usually
appear in sequence diagrams.
Naming Conventions
The name of a classifier role consists of a role name and base class name. You can
omit one of the names. The following table identifies the variations of the naming
convention.
Convention
Example
Description
/rolename:baseclass
/courseOffering:course The courseOffering role is based on the
course class.
/rolename
/courseOffering
Role name. The base class is hidden or is
not defined.
:baseclass
:course
Unnamed role based on the course class.
11