Closed tsdh closed 9 years ago
You are right, the exclusion of interface reduces the multiplicities at this point to 0..1
.
Great!
@SvenPeldszus You have adjusted the multiplicities of the wrong (opposite) references. There can be at most one overloaded
method and at most one hidden
field. But your changes say that there can be at most one overloading
method and at most one hiding
field which is wrong of course.
Oh sorry, I have corrected it.
Not pushed yet.
Ah, and you modified overloaded
/overloading
instead of overridden
/overriding
. The former is correct with 0..*
on both sides. Sorry, I've been wrong there in my last comment, too. ;-)
Shouldn't hiddenBy
be 0..*
because a field can be hidden by multiple others as in the following?
class A {int a;}
class B extends A {int a;}
class C extends A {int a;}
This multiplicities are my windmills.
However, now should everything be correct.
A field can only hide one single parent field, and a method can only override a single parent method (unless interfaces are involved). So I'd suggest to define their multiplicities as
0..1
instead of0..*
.