Chapter 8. User-defined Types

This chapter describes all the OCL constructs that refer to information in user-defined types.

Features of User-Defined Types

When a user-defined type is specified in an UML diagram, a number of features of that type are given. The features of a user-defined type include the following:

  • Attributes

  • Operations

  • Class attributes

  • Class operations

  • Association ends that are derived from associations and aggregations[1]

Each feature can be used in an OCL expression. This section explains how the first four features may be used. Section 8.2 explains how to use the information in an association.

Attributes and Operations

Attributes of user-defined types may be used in expressions by writing a dot followed by the attribute name. As with ...

Get Object Constraint Language, The: Getting Your Models Ready for MDA, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.