Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Making Classes and Reference in Ecore of arbitrary Java types


Ed,

OK. This is my first posting. Newbie, I guess is the term for someone like me. I'll the newsgroup you suggested.  

But since I have you involved already...

Let me reiterate what it is I want to do; namely to extend the Thread class so I can add my own methods to the class. I need a class for this, not an attribute. I know how to subclass manually in the Java implementation, but I'd like to keep my Ecore model "up to par" with the implementation.  

I'm aware that EMF can be used to create arbitrary DataTypes, and I am using this feature already.  But that doesn't suffice for what I want to do now.

The EMF book is of little help to me in this case. Can you help?

Regards,
----------------------------------------------------
Michael Olsen
IBM Research Division, MS/3S-E47
19 Skyline Dr, Hawthorne, NY 10532



Ed Merks <merks@xxxxxxxxxx>
Sent by: emf-dev-admin@xxxxxxxxxxx

10/14/2004 02:56 PM

Please respond to
emf-dev

To
emf-dev@xxxxxxxxxxx
cc
Subject
Re: [emf-dev] Making Classes and Reference in Ecore of arbitrary Java types






Michael,


Please use the newsgroup for questions rather than the mailing list.  


I don't think it makes much sense to have a Thread be an EObject, and you won't get it to work anyway because your generated classes will extend EObjectImpl and if they extended Thread, they wouldn't be able to implement the EObject/InternalEObject API easily.   It sounds more likely that you would want an EDataType (5.5.2) with instance class Thread so that you can have attributes of type Thread.



Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 969)



Michael Olsen <cmolsen@xxxxxxxxxx>
Sent by: emf-dev-admin@xxxxxxxxxxx

10/14/2004 02:19 PM

Please respond to
emf-dev

To
emf-dev@xxxxxxxxxxx
cc
Subject
[emf-dev] Making Classes and Reference in Ecore of arbitrary Java types








I'm designing my ecore model using the Direct approach (using the EMF ecore editor.)


I would like to declare some of my classes as java.lang.Thread and java.nio.ByteBuffer.


But it seems that the only types I can assign to my classes is limited to the standard EMF types (e.g., EObject, EClassifier,...).


I read chapter 5.5 in the EMF book, but it didn't help me.


Is it even possible to declare a class of, say, type java.lang.Thread, which when generated will extend the Thread class so I can subclass it and add my own thread methods?


Can you help?


Sincerely,

----------------------------------------------------
Michael Olsen
IBM Research Division, MS/3S-E47
19 Skyline Dr, Hawthorne, NY 10532


Back to the top