somCastObj - Remarks

This method changes the behavior of an object so that its behavior will be that of an instance of the indicated ancestor class (with respect to any method supported by the ancestor). The behavior of the object on methods not supported by the ancestor remains unchanged.

This operation actually changes the class of the object (since an object's behavior is defined by its class). The name of the new class is derived from the initial name of the object's class and the name of the ancestor class, as illustrated in the Example.

This method may be used on an object multiple times, always with the restriction that the ancestor class whose behavior is selected is actually an ancestor of the true (original) class of the object.


[Back: somCastObj - Parameters]
[Next: somCastObj - Original Class]