src/swipl-devel/packages/xpce/man/refmanual/md/method.md

class method {#class-method}

Methods are used by the PCE message passing algorithm to map the combination of an object/class, the type of the message (send or get) and the selector of message onto executable code.

Additionally, methods define the expected argument types and the argument names of the operation. The PCE message passing algorithm uses this information to verify and if necessary and possible convert the types of the arguments presented,

The implementation of a method is either a C-function pointer (used for system-defined methods), or a PCE code object (used for user-defined methods). While executing the latter, the following arguments are forwarded:

| @receiver        | Receiver of the message  |
| @arg1 ... arg<n> | Arguments to the message |

See also class behaviour, send_method ->send, get_method <-get, class ->send_method, class ->get_method, object ->send_method and object <-get_method.

@see topic Specification @see class send_method @see class get_method @see object->send_method @see object->get_method @see class->send_method @see class->get_method @see class class @see class code @see topic Types

Instance variables {#class-method-instvars}

Send methods {#class-method-send}

Get methods {#class-method-get}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.