29.7. Accessor Methods
Prev | Chapter 29. Meta-Object Protocol | Next

## 29.7. Accessor Methods

### 29.7.1. Introspection

#### 29.7.1.1. Generic Function `CLOS:ACCESSOR-METHOD-SLOT-DEFINITION`

##### `(`CLOS:ACCESSOR-METHOD-SLOT-DEFINITION` `method`)`

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 returns the class `CLOS:STANDARD-WRITER-METHOD`.

  These methods can be overridden.

| These notes document CLISP version 2.45 | Last modified: 2008-05-14

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
29.6. Methods | Home | 29.8. Specializers