29.7. Accessor Methods

29.7.1. Introspection
29.7.1.1. Generic Function CLOS:ACCESSOR-METHOD-SLOT-DEFINITION
29.7.2. Customization
29.7.2.1. Generic Function CLOS:READER-METHOD-CLASS
29.7.2.2. Generic Function CLOS:WRITER-METHOD-CLASS

29.7.1. Introspection

This accessor can only be called on accessor methods. It returns the direct slot definition metaobject that defined this method. This is the value of the :SLOT-DEFINITION initialization argument associated with the method during initialization.

The specified methods for the accessor method metaobject readers

(CLOS:ACCESSOR-METHOD-SLOT-DEFINITION (method CLOS:STANDARD-ACCESSOR-METHOD))
No behavior is specified for this method beyond that which is specified for the generic function.

29.7.2. Customization

29.7.2.1. Generic Function CLOS:READER-METHOD-CLASS

Syntax
(CLOS:READER-METHOD-CLASS class direct-slot-definition &REST initargs)
Arguments
class
a class metaobject.
direct-slot-definition
a direct slot definition metaobject.
initargs
alternating initialization argument names and values.
Value
a class metaobject.
Purpose

This generic function is called to determine the class of reader methods created during class initialization and reinitialization. The result must be a subclass of CLOS:STANDARD-READER-METHOD.

The initargs argument must be the same as will be passed to MAKE-INSTANCE to create the reader method. The initargs must include :SLOT-DEFINITION with slot-definition as its value.

Methods

(CLOS:READER-METHOD-CLASS (class STANDARD-CLASS) (direct-slot-definition CLOS:STANDARD-DIRECT-SLOT-DEFINITION) &REST initargs)
(CLOS:READER-METHOD-CLASS (class CLOS:FUNCALLABLE-STANDARD-CLASS) (direct-slot-definition CLOS:STANDARD-DIRECT-SLOT-DEFINITION) &REST initargs)

These methods return the class CLOS:STANDARD-READER-METHOD.

These methods can be overridden.

29.7.2.2. Generic Function CLOS:WRITER-METHOD-CLASS

Syntax
(CLOS:WRITER-METHOD-CLASS class direct-slot &REST initargs)
Arguments
class
a class metaobject.
direct-slot
a direct slot definition metaobject.
initargs
a list of initialization arguments and values.
Value
a class metaobject.
Purpose

This generic function is called to determine the class of writer methods created during class initialization and reinitialization. The result must be a subclass of CLOS:STANDARD-WRITER-METHOD.

The initargs argument must be the same as will be passed to MAKE-INSTANCE to create the reader method. The initargs must include :SLOT-DEFINITION with CLOS:SLOT-DEFINITION as its value.

Methods

(CLOS:WRITER-METHOD-CLASS (class STANDARD-CLASS) (direct-slot CLOS:STANDARD-DIRECT-SLOT-DEFINITION) &REST initargs)
(CLOS:WRITER-METHOD-CLASS (class CLOS:FUNCALLABLE-STANDARD-CLASS) (direct-slot CLOS:STANDARD-DIRECT-SLOT-DEFINITION) &REST initargs)

These methods return the class CLOS:STANDARD-WRITER-METHOD.

These methods can be overridden.


These notes document CLISP version 2.49.93+Last modified: 2018-02-19