Package: closer-mop

Generic Function add-direct-method

Lambda List

add-direct-method (specializer method)

Arguments

The specializer argument is a specializer metaobject.
The method argument is a method metaobject.

Return Value

The value returned by this generic function is unspecified.

Details

This generic function is called to maintain a set of backpointers from a specializer to the set of methods specialized to it. If method is already in the set, it is not added again (no error is signaled).

This set can be accessed as a list by calling the generic function specializer-direct-methods. Methods are removed from the set by remove-direct-method.

The generic function add-direct-method is called by add-method whenever a method is added to a generic function. It is called once for each of the specializers of the method. Note that in cases where a specializer appears more than once in the specializers of a method, this generic function will be called more than once with the same specializer as argument.

The results are undefined if the specializer argument is not one of the specializers of the method argument.

Methods

add-direct-method ((specializer class) (method method))
This method implements the behavior of the generic function for class specializers. No behavior is specified for this method beyond that which is specified for the generic function.

This method cannot be overridden unless the following methods are overridden as well:

remove-direct-method (class method)
specializer-direct-generic-functions (class)
specializer-direct-methods (class)


add-direct-method ((specializer eql-specializer) (method method))
This method implements the behavior of the generic function for eql specializers. No behavior is specified for this method beyond that which is specified for the generic function.