Skip to main content



      Home
Home » Modeling » UML2 » Optimal way of getting superclass hierarchy of a given uml Class
Optimal way of getting superclass hierarchy of a given uml Class [message #474730] Fri, 27 July 2007 05:33 Go to next message
Eclipse UserFriend
Hi,

Given a UML Class hierarchy:
GrandParentFoo > ParentFoo > ChildFoo
If I have ChildFoo, what is the most optimal way of getting the list of
super classes [ParentFoo, GrandParentFoo] (in no particular order)? Note:
I don't declare multiple super classes in the same level. What I do now is
I call getSuperClasses() and get the first one recursively.

Thanks,
Francis
Re: Optimal way of getting superclass hierarchy of a given uml Class [message #474737 is a reply to message #474730] Fri, 27 July 2007 14:00 Go to previous messageGo to next message
Eclipse UserFriend
Francis,

Classifier#allParents() will give you all of the general classifiers, which,
for a class, should all be classes...

Kenn

"Francis" <fgavino@gmail.com> wrote in message
news:488788c62c5e78cb3e3b2a299acfffd9$1@www.eclipse.org...
> Hi,
>
> Given a UML Class hierarchy:
> GrandParentFoo > ParentFoo > ChildFoo
> If I have ChildFoo, what is the most optimal way of getting the list of
> super classes [ParentFoo, GrandParentFoo] (in no particular order)? Note:
> I don't declare multiple super classes in the same level. What I do now is
> I call getSuperClasses() and get the first one recursively.
>
> Thanks,
> Francis
>
Re: Optimal way of getting superclass hierarchy of a given uml Class [message #474741 is a reply to message #474737] Fri, 27 July 2007 15:48 Go to previous message
Eclipse UserFriend
Thanks Kenn, this is exactly what we need.

- Francis -

Kenn Hussey wrote:

> Francis,

> Classifier#allParents() will give you all of the general classifiers, which,
> for a class, should all be classes...

> Kenn
Re: Optimal way of getting superclass hierarchy of a given uml Class [message #624113 is a reply to message #474730] Fri, 27 July 2007 14:00 Go to previous message
Eclipse UserFriend
Francis,

Classifier#allParents() will give you all of the general classifiers, which,
for a class, should all be classes...

Kenn

"Francis" <fgavino@gmail.com> wrote in message
news:488788c62c5e78cb3e3b2a299acfffd9$1@www.eclipse.org...
> Hi,
>
> Given a UML Class hierarchy:
> GrandParentFoo > ParentFoo > ChildFoo
> If I have ChildFoo, what is the most optimal way of getting the list of
> super classes [ParentFoo, GrandParentFoo] (in no particular order)? Note:
> I don't declare multiple super classes in the same level. What I do now is
> I call getSuperClasses() and get the first one recursively.
>
> Thanks,
> Francis
>
Re: Optimal way of getting superclass hierarchy of a given uml Class [message #624117 is a reply to message #474737] Fri, 27 July 2007 15:48 Go to previous message
Eclipse UserFriend
Thanks Kenn, this is exactly what we need.

- Francis -

Kenn Hussey wrote:

> Francis,

> Classifier#allParents() will give you all of the general classifiers, which,
> for a class, should all be classes...

> Kenn
Previous Topic:Register a profile as built-in
Next Topic:Register a profile as built-in
Goto Forum:
  


Current Time: Wed Jul 16 16:32:51 EDT 2025

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

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

Back to the top