All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 2 Objective-C Reference

NextPrevUpTopContentsIndex

objc-class-method-signature

Function
Summary

Tries to find the relevant method, and returns its signature.

Package

objc

Signature

objc-class-method-signature class-spec method-name => arg-types, result-type, type-encoding

Arguments

class-spec

A string, an objc-object-pointer or an objc-class pointer.

method-name

A string.

Values

arg-types

A list.

result-type

A foreign type descriptor.

type-encoding

A string.

Description

The function objc-class-method-signature tries to find the relevant method, and returns its signature.

class-spec needs to be a string naming a class, an objc-object-pointer foreign pointer (which specifies its class), or an objc-class pointer.

method-name specifies the method name. It can be either a class method or an instance method.

The first return value is a list of the argument types (that is, foreign types). Note that the first and second arguments of all Objective-C methods are the object/class and the method selector (name). These are are typed as objc-object-pointer and sel, so the arg-types list always starts with these two symbols.

The second return value is the result type of the method.

The third return value is a string which is the type encoding of the signature of the method, as stored internally by the Objective-C runtime system.

If objc-class-method-signature fails to locate the method, it returns nil.

See also

objc-class
objc-object-pointer
sel


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 15 Feb 2015

NextPrevUpTopContentsIndex