Chapter 4. Implementing OCL

This chapter describes how OCL expressions can be implemented in code. Although the Java language is used in the examples, the principles explained can be applied using any object-oriented programming language as target language. Even a non-object-oriented language could be used, but the process would be more cumbersome.

The process of mapping OCL expressions to code can be perfomed manually or by automated tools. Several available tools can translate OCL to code. Because the tool market is rapidly changing, we do not provide a list of tools in this book; it would be outdated quickly. Instead, on the Web site http://www.klasse.nl/ocl/ you can find an up-to-date list of tools that are currently available.

This chapter ...

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.