Chapter 3 Building Structural Diagrams


Object property sheet General tab

The General tab contains the following properties:

Property Description
Name Specifies the name of the item, which should be clear and meaningful, and should convey the item's purpose to non-technical users. Not compulsory since you can have an object representing an unnamed instance of a class or interface, but if omitted, you need to supply the class or interface name in the Classifier box.

The name should be unique per class or interface. Two objects could share the same name only if they belong to two different classes or interfaces.
Code Specifies the technical name of the object, which is used for generating code or scripts.
Comment Descriptive comment for the object.
Stereotype Extends the semantics of the object beyond the core UML definition.
Classifier Class or interface of which an object is an instance. You can link an object to a class or interface, or create a class using the Create Class button beside this box
Multiple Object that represents several instances

Classifier property of the object

You can create an object as an instance of a class or interface by dragging the class or interface from the Browser, and dropping it into the object diagram. You can also copy a class or interface and paste it, or paste it as shortcut, into the object diagram

Why would you link an interface to an object? If you have identified the interfaces with their methods (the contract is passed directly to the interface, it shows what the method is doing for the interface) and know the interface that holds the methods you need (the class being only used as a bridge towards the interface), but do not know the class of which the object is an instance, it can be useful to link the object directly to the interface.

For more information on linking a class or interface to an object, see section Linking a class or interface to an object, in chapter Working with Object-Oriented models.

 


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