Package: closer-mop
Generic Function ensure-generic-function-using-class
Lambda List
ensure-generic-function-using-class (generic-function fun-name &key environment generic-function-class &allow-other-keys)
Arguments
Return Value
The result is a generic function metaobject.
Details
The generic function ensure-generic-function-using-class is called to
define or modify the definition of a globally named generic function. It is called by the ensure-generic-function function. It can also be called
directly.
The first step performed by this generic function is to compute the set of initialization arguments which will be used to create or reinitialize the globally named generic function. These initialization arguments are computed from the full set of keyword arguments received by this generic function as follows:
If the class of the generic-function argument is not the same as the class specified by the :generic-function-class argument, an error is signaled.
Otherwise the generic function generic-function is redefined by calling the reinitialize-instance generic function with generic-function and the initialization arguments. The generic-function argument is then returned.
The first step performed by this generic function is to compute the set of initialization arguments which will be used to create or reinitialize the globally named generic function. These initialization arguments are computed from the full set of keyword arguments received by this generic function as follows:
- The :generic-function-class argument is not included in the initialization arguments.
- If the :method-class argument was received by this generic function, it is converted into a class metaobject. This is done by looking up the class name with find-class. If there is no such class, an error is signalled.
- All other keyword arguments are included directly in the initialization arguments.
If the class of the generic-function argument is not the same as the class specified by the :generic-function-class argument, an error is signaled.
Otherwise the generic function generic-function is redefined by calling the reinitialize-instance generic function with generic-function and the initialization arguments. The generic-function argument is then returned.
Methods
ensure-generic-function-using-class ((generic-function
generic-function) function-name &key :generic-function-class &allow-other-keys)
ensure-generic-function-using-class ((generic-function null) function-name &key :generic-function-class &allow-other-keys)
This method implements the behavior of the generic function in the case where function-name names an existing generic function.
This method can be overridden.
This method can be overridden.
ensure-generic-function-using-class ((generic-function null) function-name &key :generic-function-class &allow-other-keys)
This method implements the behavior of the generic function in the case where function-name names no function, generic function, macro or
special form.