Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Get EClasses that extend a given EClass
Get EClasses that extend a given EClass [message #1162625] Wed, 30 October 2013 14:05 Go to next message
Kyle B is currently offline Kyle BFriend
Messages: 14
Registered: April 2013
Junior Member
Hello,

I'm trying to get a list of EClass objects that extend a given EClass. I know I can get the super classes of a given EClass, but I want to go the opposite direction. My current approach is to iterate over the EPackage registry and build a Map<EClass, List<EClass>>.

I think I know the answer, but is there any EMF properties that might make this cleaner?

Thanks,
Kyle
Re: Get EClasses that extend a given EClass [message #1162656 is a reply to message #1162625] Wed, 30 October 2013 14:27 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Kyle,

The subclasses of a class is an unbounded set so only by imposing
bounds, i.e., by considering only all classes of all packages in the
package registry, can you get a bounded result. Of course there might
come into existence a dynamic subclass, or even a dynamically loaded
bundle that contributes to the package registry a package that contains
a subclass, and you won't discover those...

On 30/10/2013 3:05 PM, Kyle B wrote:
> Hello,
>
> I'm trying to get a list of EClass objects that extend a given EClass.
> I know I can get the super classes of a given EClass, but I want to go
> the opposite direction. My current approach is to iterate over the
> EPackage registry and build a Map<EClass, List<EClass>>.
> I think I know the answer, but is there any EMF properties that might
> make this cleaner?
>
> Thanks,
> Kyle


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Merging in Real Life
Next Topic:Instance of Ecore.ecore
Goto Forum:
  


Current Time: Thu Apr 25 16:52:22 GMT 2024

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

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

Back to the top