I'm new at uml (uml2 tools, emf, ...) and I'm trying to get my first experiences with this framework respectively tools. Now I'm at the point where I try to model some small class diagrams and generate the corresponding java classes from it.
My question is now: How I'm able to use particular java types which are defined in jars or in classes that are not specified in a *.uml file (model).
Why I'm asking: I'm developing some sub-projects which shall be embedded in an existing application. No one has made the effort to model all the existing java classes and a kind of reverse engineering is also not possible. Some of the planed classes that I'll develop will use the already available application sources. I know the APIs of the classes but I don't want to model this (only use them as a kind of DataType in my class diagrams).
I'm aware that this will lead to the fact that I'll get rid of the nice features of the emf framework but in my case its ok.
A example of what I mean:
1. I model the Class: XYZClass
2. XYZClass has attribute:
a : EString
b : ABCClass
The ABCClass is a class which exists already somewhere in the source code and that I have to use for the realization of XYZClass.
Vlad Varnica Messages: 546 Registered: July 2009 Location: Milton Keynes - UK
If I understand well you demand it seems to me that you need to be able to model .java as well as .class
Your question is therefore related to Java modeling of existing code.
This java detection requires the use of the reverse engineering concept:
Have a look at the following links in order to help you to see how the reverse engineering works and select the best option for you: