harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Blewitt <alex.blew...@gmail.com>
Subject Re: strong type cast needed in java. (overriding enhancement.)
Date Thu, 23 Dec 2010 09:30:35 GMT
A.foo()

Sent from my iPhone 4

On 23 Dec 2010, at 06:35, hari ks <hari_tcs@yahoo.com> wrote:

> I have put up a post here : 
> http://programparadigm.blogspot.com/2010/12/method-overriding-enhancements-strong.html
> 
> 
> Suppose class B extends A.
> A a = new B();
> ((A)a).foo(); // still calls class B's foo() method.
> 
> Can something like "a.super.foo();" method invocation be made possible. Or ((A 
> strong)a).foo();  should call A's foo() method with B's instance data.
> 
> similar thing for C++.
> 
> Is there a way to already do this?
> 
> thanks & regards,
> Hari
> 
> 
> 

Mime
View raw message