manpagez: man pages & more
info goops
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Class Redefinition

The default class-redefinition method, specialized for classes with the default metaclass <class>, has the following internal protocol.

class-redefinition (old <class>) (new <class>) (method)

This protocol cleans up things that the definition of the old class once changed and modifies things to work with the new class.

The default remove-class-accessors! method removes the accessor methods of the old class from all classes which they specialize.

The default update-direct-method! method substitutes the new class for the old in all methods specialized to the old class.

The default update-direct-subclass! method invokes class-redefinition recursively to handle the redefinition of subclasses.

When a class is redefined, any existing instance of the redefined class will be modified for the new class definition before the next time that any of the instance's slot is referenced or set. GOOPS modifies each instance by calling the generic function change-class.

The default change-class method copies slot values from the old to the modified instance, and initializes new slots, as described in Changing the Class of an Instance. After doing so, it makes a generic function invocation that can be used to customize the instance update algorithm.

change-class (old-instance <object>) (new <class>) (method)


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.