IntelliJ Community . UpOrDown
UpOrDown
HOME
INDEX
SEARCH
CHANGES
GO
"Casting from a bse class to a derived class is often called a
downcast
because of the convention of drawing inheritance trees growing from the root down." (
Bjarne Stroustrup. The C++ Programming Language. Special 3rd Edition.
Section 15.4, page 408).
"Why “upcasting”? The reason for the term is historical, and based on the way class inheritance diagrams have traditionally been drawn: with the root at the top of the page, growing downward. (Of course, you can draw your diagrams any way you find helpful.) [...] Casting from a derived type to a base type moves
up
on the inheritance diagram, so it’s commonly referred to as
upcasting
." (
Bruce Eckel. Thinking In Java. 3rd Edition
)
See also
http://www.refactoring.com/catalog/pushDownMethod.html
and
http://www.refactoring.com/catalog/pullUpMethod.html
--
TimurZambalayev
- Jun 04, 2003
e d i t
a t t a c h
r e f - b y
d i f f s
m o r e
Have ideas, requests, problems regarding this site?
Send
feedback.
Copyright © 2000-2003 by the contributing authors. All materials at intellij.org are the property of the contributing authors.