Newbie - generated class is extending interface not implementing [message #624901] |
Thu, 15 October 2009 11:55  |
Eclipse User |
|
|
|
Total, total newbie with UML/EMF.
Usign UML2 Tools I've created a simple interface with a single method "hello". A simple class has an interfaceRealization link to the interface.
I have created an EMF .gencode file from the .uml file, which shows "HelloClass -> Hello" (I presume this means HelloClass implements Hello).
When I generate the Java model I instead find that "HelloClass" is now an interface extending "Hello", rather than a class implementing "Hello".
Where am I going wrong?
Thanks,
|
|
|
Re: Newbie - generated class is extending interface not implementing [message #624902 is a reply to message #624901] |
Thu, 15 October 2009 13:27  |
Eclipse User |
|
|
|
Tony,
Comments below.
Tony Bryan wrote:
> Total, total newbie with UML/EMF.
>
> Usign UML2 Tools I've created a simple interface with a single method
> "hello". A simple class has an interfaceRealization link to the
> interface.
>
> I have created an EMF .gencode file
*.genmodel?
> from the .uml file, which shows "HelloClass -> Hello" (I presume this
> means HelloClass implements Hello).
It's showing EClasses I guess?
>
> When I generate the Java model I instead find that "HelloClass" is now
> an interface extending "Hello", rather than a class implementing "Hello".
Every EClass X will always map to an interface X; that interface
typically has an implementation class XImpl. There's no such concept of
classes verses interfaces in Ecore, so don't expect it.
>
> Where am I going wrong?
Probably isn't an issue of expectations verses how it actually works.
>
> Thanks,
|
|
|
Powered by
FUDForum. Page generated in 0.03634 seconds