How to figure out all attributes and associations of any model class [message #495243] |
Wed, 04 November 2009 05:18  |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
I'm currently working in an environment where several generated EMF
meta-models can be situated. So it happens that I get a concrete model
and want to print out some information about it. For example I get the
root EObject with the following statement:
EObject root = resource.getContents().get(0);
Now I want to iterate over every class in this class hierarchy and want
to print out every property which where modeled in the meta-model. Is it
possible anyhow to figure out generically for any model class for any
meta-model the properties? Until now I only do reflection to see if an
EObject has a "getName()" method to print out the name. I hope I
expressed myself understandable.
best regards,
Gilbert
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.31016 seconds