abstract with copy inheritance [message #555937] |
Mon, 30 August 2010 10:08 |
Andreas Mertgen Messages: 4 Registered: August 2010 |
Junior Member |
|
|
Suppose we have a simple base class B with a method bar.
Let us look at the following team T0:
public abstract team class T0 {
protected abstract class R {
protected abstract void foo();
}
protected abstract class NR extends R playedBy B {
foo <- before bar;
}
}
Due to the abstract method foo, both roles and therefore the team have to be abstract.
Now let us have a look at a subclassing team T1:
public team class T1 extends T0 {
protected class R {
protected void foo(){...};
}
protected class NR {};
}
Here of course, we have to add the missing implementation of foo to make the role R non-abstract. However, role NR must be "overridden" as well to get rid of the abstract property.
I understand, that the mechanism has to handle the "abstract"-issue explicitly. But the resulting implementation with an empty role class seems to be a little odd. Is there a better way to deal with implicit inheritance like in this situation?
[Updated on: Mon, 30 August 2010 13:44] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04746 seconds