Re: Two methods, same signature, different return types

Jevgeni Kabanov <[email protected]> Mon, 18 Aug 2008 11:23:49 +0300
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
Yeah, but as I said there are most likely considered implementation
details and not covered in JLS (like the rest of synthetic methods,
btw). Note, that as far as Java language is concerned these methods do
not exist. The compiler will choose the non-Bridge ones when calling
the class and the only way they ever will be called is via a super
class or an interface. And since JVM includes the return type in the
method descriptor there's no real need to describe in the JVM spec
either.

Jevgeni Kabanov

On Mon, Aug 18, 2008 at 11:13 AM, Attila Szegedi <[email protected]> wrote:
> Yep, they're bridge methods -- thanks, I forgot that was their name,
> so was looking in JLS for "synthetic" instead. Still, there's no
> provision for ignoring bridge methods when choosing among overloaded
> methods...
>
> Attila.
>
> On Aug 17, 2008, at 11:33 PM, Jevgeni Kabanov wrote:
>
>> Perhaps this is not a part of JLS at all. Java 1.5 introduced a new
>> BRIDGE access modifier. Perhaps the Java compiler will just ignore all
>> methods marked with that? The only mention of bridge methods is in
>> section 15.12.4 in Discussion. I think it is not considered a part of
>> Java language, but just an implementation detail.
>>
>> Jevgeni Kabanov
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com