Chapter 4 Extending your Models with Profiles


Stereotypes (Profile)

Stereotypes are a per-instance extension mechanism. When a stereotype is applied to a metaclass instance (by selecting it in the Stereotype field of the object's property sheet), any extensions that you add to the stereotype are then applied to the instance.

Stereotypes can be promoted to the status of metaclasses to give them greater visibility in the interface, with a specific list, Browser category and, optionally custom symbol and palette tool. For more information, see Defining a stereotype as a metaclass.

You can define more than one stereotype for a given metaclass, but you can only apply a single stereotype to each instance. Stereotypes support inheritance: extensions to a parent stereotype are inherited by its children.

You can create a stereotype within a metaclass, a criterion, or another stereotype.

Steps To create a stereotype:

  1. Right-click a metaclass, criterion, or stereotype, and select New→Stereotype in the contextual menu.

    A new stereotype is created with a default name.
  2. Type a stereotype name in the Name box, and fill in any of the other properties that are relevant.


    Once you have created the stereotype, you can define extensions like a custom tool, or custom checks for the stereotype. These extensions will apply to all metaclass instances that carry the stereotype.

 


Copyright (C) 2008. Sybase Inc. All rights reserved.