Get EClasses that extend a given EClass [message #1162625] |
Wed, 30 October 2013 10:05  |
Eclipse User |
|
|
|
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 10:27  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04380 seconds