Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » The definitive truth about multiple inheritance
The definitive truth about multiple inheritance [message #431102] Sun, 28 June 2009 21:41
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
Happy to join the team of EMF's users !

After many searches, I have found no clear answer to my basic question
about multiple inheritance.

The EMF documentation
( e.emf.doc/references/overview/EMF.html
, chapter "EMF developper guide", section "EMF developper guide",
subsection "EMF Framework Programmer's Guide") saids :

"As in Java itself, multiple interface inheritance is supported, but
each EMF class can only extend one implementation base class. Therefore,
when we have a model with multiple inheritance, we need to identify
which of the multiple bases should be used as the implementation base
class. The others will then be simply treated as mixin interfaces, with
their implementations generated into the derived implementation class."

The example shows a model with a class [SchoolBook] that inherits
<<extends>> [Book] and that inherits [Asset]; this class should be
implemented by extending (Java) the class Book and implenting the
methods of the class Asset by copying them from Asset.

I tried to apply that to my model :
D inherits from A that inherits from Action, and C that inherits from Class.
The implementation of class D does provide implementations for methods
found in A and C, but does provide no implementations for methods coming
from inheritance of the class not extended (Action or Class depending on
the class (C or A) that D extends).

Have I missed something ?
If not, why isn't it possible for EMF to automatically generate the
"good" implementation ?
What can I do to solve my problem ?

Thank you very much for clarify my knowledge ...

Guillaume Vauvert
Previous Topic:[TENEO] No annotated model element present for Diagram
Next Topic:obtain ecore form of an instance model
Goto Forum:

Current Time: Tue Sep 29 21:35:03 GMT 2020

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

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

Back to the top