JLS changes for module impact on inheritance and overriding?
Jonathan Gibbons
Jonathan.Gibbons at Sun.COM
Fri Feb 6 11:51:34 PST 2009
Karen,
No blue text here.
-- Jon
Karen Kinnear wrote:
>
> Alex,
>
> With this JSR 294 proposal, would you expect to also change the JLS
> in the following ways? See the text
> added in blue below relative to JLS 3rd edition.
>
> I am currently assuming these changes in the prototype I am making
> with the hotspot vm.
>
> thanks,
> Karen
>
> 8.4.8 Inheritance, Overriding, and Hiding
>
> A class C inherits from its direct superclass and direct
> superinterfaces all non-private methods (whether abstract or not) of
> the superclass and superinterfaces that are public, protected or
> declared module and in the same module as C, or declared with default
> access in the same package as C and are neither overridden (§8.4.8.1)
> nor hidden (§8.4.8.2) by a declaration in the class.
>
> 8.4.8.1 Overriding (by Instance Methods)
>
> An instance method m1 declared in a class C overrides another instance
> method, m2, declared in class A iff all of the following are true:
>
> C is a subclass of A.
> The signature of m1 is a subsignature (§8.4.2) of the signature of m2.
> Either
> m2 is public, protected or declared module and in the same module as
> C, or declared with default access in the same package as C, or
> m1 overrides a method m3, m3 distinct from m1, m3 distinct from m2,
> such that m3 overrides m2.
> Moreover, if m1 is not abstract, then m1 is said to implement any and
> all declarations of abstract methods that it overrides.
More information about the jigsaw-dev
mailing list