Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Newbie - generated class is extending interface not implementing
Newbie - generated class is extending interface not implementing [message #624901] Thu, 15 October 2009 15:55 Go to next message
Tony Bryan is currently offline Tony Bryan
Messages: 4
Registered: October 2009
Junior Member
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 17:27 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26138
Registered: July 2009
Senior Member
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,
Previous Topic:UML Profile - Stereotype - Tagged Values - Value Editor(s)
Next Topic:how to initialize class diagram from UML2 Model programmactically
Goto Forum:
  


Current Time: Fri Oct 24 07:21:55 GMT 2014

Powered by FUDForum. Page generated in 0.02012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software