Private visibility of UML class attributes [message #626981] |
Fri, 03 October 2008 18:19 |
Firas Swidan Messages: 13 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am trying to use a simple UML -> Ecore -> java code transformation to
generate java code from a UML class diagram (on a side note, I had to read
material and view movies for 2-3 days to figure out how to do the above
basic operation. Though I am totally new to MDA, it would have been nice
to have a faster kick start).
I specify the visibility of an attribute in a UML2 class to private (using
UML2 tools graphical interface). However, the generated java code declares
the generated attribute as protected. Am I doing something wrong? I
noticed that the intermediate ecore model lacks the equivalent of
visibility. Is this the source of the problem? If so, is there a way to
bypass the ecore model and generate the java code directly from the UML
(my understanding is that ecore is a higher level of MOF abstraction than
UML. If so, it is weird that one needs to go up the MOF hierarchy before
going down again to the code level).
Thanks for any tips and corrections.
Firas.
|
|
|
Powered by
FUDForum. Page generated in 0.02929 seconds