Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to use existing java classes as Types in uml
How to use existing java classes as Types in uml [message #628236] Wed, 17 February 2010 10:46 Go to next message
Adam Lukaszewski is currently offline Adam Lukaszewski
Messages: 2
Registered: February 2010
Junior Member
Hi eclipse community,

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.

Thanks for help...
Re: How to use existing java classes as Types in uml [message #628237 is a reply to message #628236] Wed, 17 February 2010 11:20 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
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:

- EclipseUML 2008 reverse engineering of Legacy Jar file: http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html
- How to reverse a Java code into a Class diagram : http://www.forum-omondo.com/documentation_eclipseuml_2008/qu ickstar_of_EclipseUML/index.html#3._How_to_reverse_a_Java_co de_into_a
- Reverse Engineering options: http://www.forum-omondo.com/documentation_eclipseuml_2008/re verse/reverse/index.html
- Reverse Engineering example: http://www.forum-omondo.com/documentation_eclipseuml_2008/re verse/reverse/reverse_engineering_example.html
Reverse Engineering (5min): http://www.ejb3.org/reverse.swf / .http://www.ejb3.org/Reverse_a_Java_Project.exe

The reverse engineering of java to EMF inside Eclipse is only an Omondo patent which has never been donated to any company. Please don't be abuse !!
Re: How to use existing java classes as Types in uml [message #628324 is a reply to message #628236] Thu, 11 March 2010 15:03 Go to previous message
Konstantin is currently offline Konstantin
Messages: 8
Registered: March 2010
Location: Germany
Junior Member
Why no reversal engineering? You are developing application. So you are using the java classes/jars. Why can't you use this files for modeling?
Previous Topic:How to use existing java classes as Types in uml
Next Topic:Re: ApplyStereotype method - issue
Goto Forum:
  


Current Time: Wed Aug 20 04:59:16 EDT 2014

Powered by FUDForum. Page generated in 0.01651 seconds