Define Behavior on Creating an Instance

Return to Introduction  Previous page  Next page

The _instanceType attribute is applied to a stereotype element and defines what kind of element is created as an instance of this element type.  The value corresponds to the metatype given to a stereotype using the _metatype attribute.  It is shown on the Paste Element dialog and is translated if it matches an Enterprise Architect element type.

The _instanceMode attribute is applied to a stereotype element and and controls the text shown in the Paste Element dialog after being translated.  Valid values are instance and property, with the default being instance.

The _instanceOwner attribute is applied to a stereotype element and controls the text shown in the Paste Element dialog.  It is translated if it matches an Enterprise Architect element type.  The default value is Element.

The following example from SysML shows that when an instance of a block is created, it is created as a BlockProperty element.

StereotypeWithInstanceMode