class Vehicle { public int type; public abstract void start(); } /* Class Vehicle is the base for all vehicle hierarchy */ // file: Color.java // package OFLML_JavaCars; public class Color { } // file: Car.java // package OFLML_JavaCars; public class Car { public Color color; public void setColor(Color c) {}; public Color getColor() { return color; }; public void start() {}; } Figure 8.1 gives an example of a model for an application which uses an OFL-ML profile for OFL-Java: three descriptions : Vehicle, Car, and Color, one Java concretization relationship : class Car is a concretization of the abstract class Vehicle, one Java aggregation relationship: class Car has an attribute of type Color. The diagram corresponds to above Java code. The OFL-ML Java Profile elements used have been defined according to previous sections. The diagram was generated with Objecteering UML Modeler version 5.2.2 [Sof03].
[1]
Philippe Leblanc,et al.
An Action Language for UML: Proposal for a Precise Execution Semantics
,
1998,
UML.
[2]
Philippe Lahire,et al.
MODIFIERS IN OFL - AN APPROACH FOR ACCESS CONTROL CUSTOMIZATION
,
2003
.
[3]
Colin Atkinson,et al.
Strict Profiles: Why and How
,
2000,
UML.
[4]
Adeline Capouillez,et al.
OFL: Hyper-Genericity for Meta-Programming - An application to Java
,
2002
.
[5]
Desmond D'Souza,et al.
First-Class Extensibility for UML-Profiles, Stereotypes, Patterns
,
1999,
UML.