UML 2.0 Class Diagram Elements

From RAD Studio
Jump to: navigation, search

Go Up to UML 2.0 Class Diagrams

Model element is any component of your model that you can put on a diagram. Model elements include nodes and links between them.

Available Model Elements of UML 2.0 Class Diagrams

You can create model elements using the context menus in the Model and Diagram Views and using the Tool Palette.

The following table lists the available model elements of UML 2.0 class diagrams:

UML 2.0 class diagram elements

Icon Element Name Type Comment

Package icon

Package element

Package

Node

Class icon

Class element

Class

Node

Interface icon

Interface element - New UML 2.0
Interface element

Interface

Node

You can switch between these graphical representations using the View as Class property in the Object Inspector.

Association Class icon

Association Class element

Association Class

Node

An association class has both association and class properties and can be seen as an n-ary association that also has class properties. See N-ary Association in Relationships Among Elements of Class Diagrams.

Enumeration icon

Enumeration element

Enumeration

Node

Data Type icon

Data Type element

Data Type

Node

Port icon

Port element

Port

A port is a property of a classifier (class or association class) that specifies a distinct interaction point between that classifier instance and its environment or between a classifier instance and instances it may contain.

Instance Specification icon

Instance Specification element

Instance Specification

Node

An instance specification specifies the existence of an entity that represents an instance of a model element in a modeled system and completely or partially describes the entity.

Generalization icon

Generalization relationship

Implementation relationship

Generalization

Implementation

Link

Link

Generalization and Implementation links are created by the same Generalization icon command. Generalization indicates inheritance between two classes or two interfaces. Implementation indicates a class that implements an inherited interface. See the description of Generalization and implementation relationships in Relationships Among Elements of Class Diagrams.

Provided Interface icon

Provided Interface link

Provided Interface

Link

The set of interfaces realized by a classifier are its provided interfaces, which represent the obligations that instances of that classifier have to their clients. The provided interfaces describe the services that the instances of that classifier offer to their clients.

Required Interface icon

Required Interface Link

Required Interface

Link

Required interfaces specify services that a classifier needs in order to perform its function and fulfill its own obligations to its clients.

Association icon

Association relationship

Association

Link

Possible types: association, aggregation, and composition.
See the description of Association relationships in Relationships Among Elements of Class Diagrams.

Association End icon

Association End links

Association End

Opens the Association End context menu to select the type (class, structure, enumeration, union) of a participant to add as an association end.

Used to specify association end classes (participants) in an association, which property is represented by an Association Class. See N-ary Association in Relationships Among Elements of Class Diagrams.

Dependency icon

Dependency relationship

Dependency

Link

See the description of Dependency relationships in Relationships Among Elements of Class Diagrams.

Node by Pattern icon

Node by Pattern

Node

Opens Pattern Wizard.

Link by Pattern icon

Link by Pattern

Link

Opens Pattern Wizard.

Constraint icon

Constraint element

Constraint

"OCL expression" or "free-syntax constraint"

By default, the Modeling tries to validate the specified constraint text as an OCL expression. If it cannot be validated, then the Constraint is red highlighted. To suppress red highlighting, set the Constraint language property to Text (in the Object Inspector).

Constraint link icon

Constraint link

Constraint link

Constraint link

Note icon

Note element

Note

Annotation

Note Link icon

Note Link

Note Link

Annotation link

You see the note connected by the note link with another modeling element.

Image icon

Image element

Image

Illustration - frame of the image placeholder.

The Tool Palette command puts on a diagram only the empty frame of the image placeholder. To render an image in this frame:

  • Select this image placeholder.
  • In the Image path property of the Object Inspector, specify the file of the image to be rendered.

Here you see the Embarcadero image, rendered in the frame of the image placeholder.

Image Link icon

Image Link

Image Link

Illustration link

You see the Embarcadero image connected by the image link with another modeling element.


Container Elements. Members of Container Elements

On class diagrams, some types of elements (containers) can have internal members. Internal members can be created in container elements using the context menus of container elements in the Model View and in the Diagram View.

The table below lists the available container elements of UML 2.0 class diagrams along with the members that can be added into them.

Available container elements and members

Container element Members available

Package

Package
Class
Association Class
Interface
Enumeration
Data Type
Instance specification

Class

Class
Interface
Attribute
Operation
Constructor
Enumeration
Data Type
Interaction

Association Class

Class
Interface
Attribute
Operation
Constructor
Enumeration
Data Type
Interaction

Interface

Attribute
Operation
Enumeration
Data Type
Interaction

Data Type

Attribute
Operation

Enumeration

Enumeration literal


Classifiers. Inner classifiers

In general, those modeling elements that can have instances are called classifiers. Classifiers have structural features (attributes) and behavioral features (operations). In the Modeling, classifiers are the basic nodes of Class diagrams: classes, interfaces, and association classes. Some of them can include other classifiers, or inner classifiers.

The table below lists the container elements of class diagrams along with the inner classifiers that you can add into container elements.

Inner classifiers:

Container element Available inner classifiers

Class

Class
Interface

Association Class

Class
Interface

Interface


See Also