Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:33 Go to next message
Francis Gavino is currently offline Francis GavinoFriend
Messages: 57
Registered: July 2009
Member
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 18:00 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
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 19:48 Go to previous message
Francis Gavino is currently offline Francis GavinoFriend
Messages: 57
Registered: July 2009
Member
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 18:00 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
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 19:48 Go to previous message
Francis Gavino is currently offline Francis GavinoFriend
Messages: 57
Registered: July 2009
Member
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: Fri Apr 03 11:58:02 GMT 2020

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

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

Back to the top