thanks very much
It does not look like a feature that will be widely used, so
there may not be a specific reason other than "not enough reason
to add a feature".
Arne
If the parent class has overidden a method why should you be permitted
to bypass that decision? Doing so may break the parent class.
Mark Thornton
>Can anybody tell me why code like :
>super.super.someMethod();
>is not allowed?
There normally is a reason for a class overwriting a method. If you
allow super.super.do(), then basically the hierarchical system of
inheritance is gone and you can have all classes defined as subclasses
of Object. Saying it this way might be a bit overkill, but I think
that is the general idea behind it.
--
Claus Dragon <clau...@mpsahotmail.com>
=(UDIC)=
d++ e++ T--
K1!2!3!456!7!S a29
"Coffee is a mocker. So, I am going to mock."
- Me, lately.
If a such feature would exists it should be avoided because it will
create an highly coupling between the class and its super super class.
--
Andrea Francia
http://www.andreafrancia.it/
>Can anybody tell me why code like :
>super.super.someMethod();
>is not allowed?
Because when you write a class you expose only as much as you need to.
If you don't expose something, there may well be good reason. Fiddling
with it could cause something in the parent class to stop working.
super.super would give you power to override those decisions.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
I would be interested in seeing how you would do it. The problem is:
"If the underlying method is an instance method, it is invoked using
dynamic method lookup as documented in The Java Language Specification,
Second Edition, section 15.12.4.4; in particular, overriding based on
the runtime type of the target object will occur."
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Method.html
Patricia