|The definitive truth about multiple inheritance [message #431102]
||Sun, 28 June 2009 21:41
Registered: July 2009
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
( http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips 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 ...
Powered by FUDForum
. Page generated in 0.01982 seconds