Skip to main content



      Home
Home » Modeling » UML2 » Get implements interfaces, and subclasses from uml element(Get implements interfaces, and subclasses from uml element)
Get implements interfaces, and subclasses from uml element [message #661179] Wed, 23 March 2011 09:41 Go to next message
Eclipse UserFriend
Hello,
how can i know the classes that an Uml element (class type )extends, and the interfaces that the type implements.

For example if i have a class X that extends a class A, and implements Interface I, and i have uml element with types X.
How can get this values(A,I) from the uml element type X?

Can you help me?


Thanks,
Andres
Re: Get implements interfaces, and subclasses from uml element [message #661240 is a reply to message #661179] Wed, 23 March 2011 12:27 Go to previous messageGo to next message
Eclipse UserFriend
Once you have the class at hand (org.eclipse.uml2.uml.Class):

#getSuperClasses()

#getImplementedInterfaces()

Doesn't get any easier than that...

If you have a property:

Class myPropertyType = (Class) myProperty.getType();

Cheers,

Rafael
http://abstratt.com/blog

[Updated on: Wed, 23 March 2011 12:28] by Moderator

Re: Get implements interfaces, and subclasses from uml element [message #661329 is a reply to message #661179] Thu, 24 March 2011 05:45 Go to previous messageGo to next message
Eclipse UserFriend
If you are a developer then Rafael answer is exactly what you need.

If you are a modeler then the easiest is to use an existing tool. You can graphically create implementation or reverse existing code.
Topcased can detect implementation from the code but all code information will not be saved in the model and it would be really painful to create views from a model. If you are lazy and have budget then just use EclipseUML Omondo because it would do the job for you.

You will spend more playing Golf or being with your family and let other lads work late in the evening to do what already exist.
Don't forget that your company will not give any gratitude if you save them software purchase because this is another budget !!

[Updated on: Thu, 24 March 2011 05:46] by Moderator

Re: Get implements interfaces, and subclasses from uml element [message #661376 is a reply to message #661179] Thu, 24 March 2011 08:56 Go to previous messageGo to next message
Eclipse UserFriend
Smile

Personally I enjoyed reading your answer, Vlad. May I humbly ask if these kind of postings begun your special friendship with Mr. Merks?
Re: Get implements interfaces, and subclasses from uml element [message #661490 is a reply to message #661329] Thu, 24 March 2011 18:16 Go to previous message
Eclipse UserFriend
On that note, if you are not a developer, this is probably not the right forum for you, as UML2 is essentially an API, with no (significant) user-facing features.
Previous Topic:uml (middleweight) metamodel extension
Next Topic:The type org.eclipse.emf.ecore.EModelElement cannot be resolved.
Goto Forum:
  


Current Time: Wed Jul 16 18:28:18 EDT 2025

Powered by FUDForum. Page generated in 0.02849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top