The Object Constraint Language: Getting Your Models Ready for MDA (2nd Edition)

There is not much use for OCL expressions in component or deployment diagrams. It is only when elements usually depicted in a class diagram are present in a component or deployment diagram that OCL expressions can be used.

For instance, when a component diagram contains explicit specifications of interfaces, the operations in the interfaces can be specified using pre- and postconditions. An example of this situation can be found in Figure 3-11, which is taken from the UML specification itself.

Figure 3-11. Component diagram

Besides interfaces, classes may be shown in a component diagram. For these, the same options discussed in Section 3.3 hold.

Категории