Computes the valid initargs of a class.
clos
compute-class-potential-initargs class => initargs
class⇩ |
A class. |
initargs⇩ |
A list of symbols, or t . |
The generic function compute-class-potential-initargs
is called to compute the initialization arguments of a class. This set of valid initargs is used by make-instance when its arguments are checked.
class is the class passed to make-instance. That is, compute-class-potential-initargs
specializes on the metaclass.
initargs is either a list of valid initargs, or t
meaning that any initialization argument is allowed.
There is a supplied method on t
, which returns nil
.
The other supplied method is on standard-class. This consults the Relevant Methods, which are the applicable methods of make-instance, allocate-instance, initialize-instance and shared-initialize. If any of the Relevant Methods have a lambda list containing &allow-other-keys then initargs is t
. Otherwise initargs is a list containing:
:extra-initargs
(see defclass for details of this), and:
The list initargs contains no duplicates, and the result of compute-class-potential-initargs
is cached so that it is not recomputed unless one of the Relevant Methods, the class or its class precedence list is altered.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:25