This chapter has discussed how OCL expressions can be implemented. The translation of the expressions to programming code must be done according to the following steps:
OCL is a language that can be used to develop platform-independent models; therefore, many design issues need to be addressed during the translation of OCL to code. Once these decisions are made, the translation process is mostly straightforward. As shown in many of the examples, the OCL code is of a significantly higher level than much of the Java code, making it easier to read and write. This is exactly what is needed when you want to apply MDA techniques to your model. |