Package: closer-mop

Generic Function update-dependent

Lambda List

update-dependent (metaobject dependent &rest initargs)

Arguments

The metaobject argument is a class or generic function metaobject. It is the metaobject being reinitialized or otherwise modified.
The dependent argument is an object. It is the dependent being updated.
The initargs argument is a list of the initialization arguments for the metaobject redefinition.

Return Value

The value returned by update-dependent is unspecified.

Details

This generic function is called to update a dependent of metaobject.

When a class or a generic function is reinitialized each of its dependents is updated. The initargs argument to update-dependent is the set of initialization arguments received by reinitialize-instance.

When a method is added to a generic function, each of the generic function's dependents is updated. The initargs argument is a list of two elements: the symbol add-method, and the method that was added.

When a method is removed from a generic function, each of the generic function's dependents is updated. The initargs argument is a list of two elements: the symbol remove-method, and the method that was removed.

In each case, map-dependents is used to call update-dependent on each of the dependents. So, for example, the update of a generic function's dependents when a method is added could be performed by the following code:
(map-dependents generic-function
                #'(lambda (dep)
                    (update-dependent generic-function
                                      dep
                                      'add-method
                                      new-method)))  

Methods

There are no specified methods on this generic function.

Notes

See the "Dependent Maintenance Protocol" section for remarks about the use of this facility.