Introduction to OOP Chapter 17: The Polymorphic Variable : next previous audio real text

Downcast (Reverse Polymorpism)

It is sometimes necessary to undo the assignment to a polymorphic variable.
That is, to determine the variables true dynamic value, and assign it to a variable of the appropriate type.

This process is termed down casting, or, since it is undoing the polymorphic assignment, reverse polymorphism.

Various different syntaxs are used for this, see the book.

Parent aVariable = ...;
Child aCard;
if (aVariable instanceof Child)
	aChild = (Child) aVariable;
Intro OOP, Chapter 17, Slide 07