19.2.  Object

An object is an instance of a class. In the UML metamodel Object is a sub-class of Instance. Within a sequence diagram objects may be used to represent a specific instance of a class. Unlike collaboration diagrams (see Chapter 21, Collaboration Diagram Model Element Reference ), sequence diagrams cannot show generic behavior between classifier roles.

An object is represented on a sequence diagram in ArgoUML as a plain box labeled with the object name (if any) and class name, separated by a colon (:). As links with stimuli to and from other objects are added, a time line grows down from the object. This is thin where the object does not have control and thick where it does.

[Caution]Caution

The current release of ArgoUML shows interactions between objects, although the UML standard for sequence diagrams is for interaction between instances of any classifier).

However the actual implementation in ArgoUML permits any classifier to be used with the object, and so the diagram can successfully represent instances of actors for example as well as classes.

19.2.1.  Object Details Tabs

The details tabs that are active for objects are as follows.

ToDoItem

Standard tab.

Properties

See Section 19.2.2, “ Object Property Toolbar and Section 19.2.3, “ Property Fields For Object below.

Documentation

Standard tab.

Presentation

Standard tab. The values for the bounds of the object notionally define the bounding box of the object and its time line. However if you change them it will have no effect, and the original values will be reset when you next revisit the tab.

Source

Standard tab, but with no contents.

[Caution]Caution

An object should not generate any code, so having this tab active is probably a mistake.

Tagged Values

Standard tab. In the UML metamodel, Object has the following standard tagged values defined.

  • persistence (from the superclass, Instance. Showing the permanence of the state information associated with the object. Values transitory (state is destroyed when the object is destroyed) and persistent (state is preserved when the object is destroyed).

  • derived (from the superclass, ModelElement). Values true, meaning the object is redundant -it can be formally derived from other elements, or false meaning it cannot.

    [Note]Note

    Derived objects still have their value in analysis and design to introduce useful names or concepts, and in design to avoid re-computation.

[Note]Note

The UML Element metaclass from which all other model elements are derived includes the tagged element documentation which is handled by the documentation tab under ArgoUML

Checklist

Standard tab for a Classifier.

19.2.2.  Object Property Toolbar

Go up

Navigate up through the package structure.

New Stereotype

This creates a new Stereotype (see Section 16.6, “ Stereotype) for the selected object, navigating immediately to the properties tab for that stereotype.

Delete

This deletes the object from the model

[Warning]Warning

This is a deletion from the model not just the diagram. To delete an object from the diagram, but keep it within the model, use the main menu Remove From Diagram (or press the Delete key).

19.2.3.  Property Fields For Object

Name

Text box. The name of the object. By convention object names start with a lower case letter and use bumpy caps to divide words within the name.

[Note]Note

ArgoUML does not enforce this naming convention.

Stereotype

Drop down selector. Object has no stereotypes by default in the UML standard.

Navigate Stereotype

icon. If a stereotype has been selected, this will navigate to the stereotype property panel (see Section 18.5, “ Stereotype).

Namespace

Text box. Records the namespace for the object. This is the package hierarchy.

Stimuli Sent

Text area. Lists the stimuli sent to this object.

Stimuli Received

Text area. Lists the stimuli received by this object.

Classifier

Drop down selector. The name of the classifier of which this is an object.

[Caution]Caution

In the current release of ArgoUML the drop down selector will include all classifiers (i.e. interfaces, actors, use cases and datatypes as well), which is what is wanted on the diagram, although it should properly be called an instance, rather than an object. In practice only instances of classes and actors make much sense.

[Note]Note

In the current release of ArgoUML the same graphical presentation is used, even if the object is actually representing an instance of an actor (when a stick-man would be more usual).