Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Using Classifiers

If you right-click on an Object in a diagram, the element context menu displays the Advanced | Instance Classifier menu option. Select this option to choose a single element (generally a Class) as the classifier or template for this Object.

The Select <Item> dialog displays. Use this to set the instance classifier.

The Object name is then displayed as Object: Classifier; for example a Person object named Joe Smith is displayed as Joe Smith: Person.




See also

If an object has a Classifier

It is important to remember that an Object is only an instance of a classifier at runtime, so the appropriate attributes and operations are those of the classifier, not the Object. Therefore, in the context menu for the Object, if you select the Attributes or Operations menu options, the Attributes or Operations dialog displays for the classifier, not the Object.

If you set the classifier for an Object in a Sequence diagram, when you add a message the drop-down list of available messages derived from the target Object come from the classifier, not the Object selected. This enables you to associate Sequence diagram objects with Classes and use the defined behavior of the Class to model actual behavior at run time.

You can also select a message for a State Flow connector. The same rules apply as for Sequence diagram objects.

Note that in the Message dialog you can also select to include messages defined in the target classifier's inheritance hierarchy.



Learn more