SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 253 | Next

Steven Kelly and Juha-Pekka Tolvanen

"Domain-Specific Modeling"

This approach
was therefore opposite to that of the previous CPL (Chapter 5) or other examples
described here that have a generator module for each domain concept. In the insurance
case the decision to use the same generator module for multiple domain concepts was
GENERATOR FOR JAVA 133
possible since the domain concepts were very similar and their main difference was
among the legal connections they could have (see Figs. 6.4 and 6.5).
As shown in the generator structure, a product had its own generator module. The
product concept was different from others since it created the product-speci?¬?c Java
class and acted as the main composite concept referring to other insurance-speci?¬?c
concepts. However, since the product concept was inherited from MOFClass and
Domain class (see Fig. 6.3), similar to other insurance-speci?¬?c modeling objects,
FIGURE 6.8 Structure of the generator
134 INSURANCE PRODUCTS
parts of the generators were the same. Therefore, those parts producing the common
MOFClass related code were put in their own generator modules for reuse. These
handled if the concept was a singleton, root, or leaf, and also produced code related to
constraints and operations. Listing 6.1 shows the generator for producing the
singleton code. In the generator de?¬?nition the ???multiplicity??? string in line 3 refers to
the property in a model element.


Pages:
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6