[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] [newbie qns] reflection and class impl

Hi,

1. is it possible to create an EClass through reflection? e.g. I have a class name as a string ("MyEClass"). Now I would like to create this class with the factory. The factory has a method "EObject create(EClass arg0)" but I don't know how to get the EClass from the string.

2. all our code is in a package seperated from the auto generated packages. If I define an operation in the ecore model (e.g. operation "myOperation" on the class "MyEClass") then I'm supposed to implement the method in the generated class "MyEClassImpl". But I would like to implement the operation in an own class (different package). Therefor I could extend the class "MyEClassImpl" but if I create this class through the factory then an object of type "MyEClassImpl" would be instantiated instead of my own implemention. Is there a good solution for this?

thanks a lot,
Alex