Determine subclasses from a metaclass [message #511918] |
Wed, 03 February 2010 12:28 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
Hi all,
I want to collect all the subtypes/implementors of an abstract/interface
metaclass with the EMF reflective API. That means this would be the
contrary operation to EClass.getEAllSuperTypes(). What is a convenient
way to solve this? There is a method EClass.isSuperTypeOf(EClass) but I
don't want to invoke this on every metaclass in metamodels. By the way,
how can I get all metaclasses in a metamodel? Can anybody help me?
best regards,
Gilbert
|
|
|
|
Re: Determine subclasses from a metaclass [message #511993 is a reply to message #511944] |
Wed, 03 February 2010 15:27 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
Thank you Ed, I got it work. But one further question.
EClass.getEPackage() returns the package of an EClass. Does
EPackage.getEClassifiers() return all classifiers independent if they
are placed not directly in the EPackage but in sub-EPackages?
|
|
|
Re: Determine subclasses from a metaclass [message #511996 is a reply to message #511993] |
Wed, 03 February 2010 15:35 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Gilbert,
No, EPackage.getEClassifiers returns only the directly contained
classifiers.
Gilbert Mirenque wrote:
> Thank you Ed, I got it work. But one further question.
> EClass.getEPackage() returns the package of an EClass. Does
> EPackage.getEClassifiers() return all classifiers independent if they
> are placed not directly in the EPackage but in sub-EPackages?
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02667 seconds