I have a class. How do I get it's structural features? [message #618270] |
Tue, 03 November 2009 12:51  |
Eclipse User |
|
|
|
Hello --
I'm using reflection to do all sorts of cool automated things which I am HOPING I can contribute back to the open source world. However, I have one bit of ugliness:
I have a class. Not an EClass, just a plain class. I need to get its EStructuralFeatures. How do I do that? How can I look up a factory if I just have a class? Is there a way for me to get an EClass from a class? Mind you, I don't have an instance of the class, I just have the class itself.
thanks much
Tamar
|
|
|
Re: I have a class. How do I get it's structural features? [message #618271 is a reply to message #618270] |
Tue, 03 November 2009 13:12  |
Eclipse User |
|
|
|
Hi Tamar,
Comments below...
Tamar Cohen schrieb:
> Hello --
>
> I'm using reflection to do all sorts of cool automated things which I
> am HOPING I can contribute back to the open source world.
I'm curious, what are you doing?
> However, I have one bit of ugliness:
> I have a class. Not an EClass, just a plain class.
Why don't you use EMF reflection?
> I need to get its EStructuralFeatures. How do I do that? How can I
> look up a factory if I just have a class?
What factory do you mean?
> Is there a way for me to get an EClass from a class? Mind you, I
> don't have an instance of the class, I just have the class itself.
I assume that you could determine the EClass of a java.lang.Class if you
have the GenModel of that EClass at hand. You'd have to traverse all
GenModels.
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.04293 seconds