Function

protocol_getMethodDescription

Returns a method description structure for a specified method of a given protocol.

Declaration

struct objc_method_description protocol_getMethodDescription(Protocol *proto, SEL aSel, BOOL isRequiredMethod, BOOL isInstanceMethod);

Parameters

p

A protocol.

aSel

A selector

isRequiredMethod

A Boolean value that indicates whether aSel is a required method.

isInstanceMethod

A Boolean value that indicates whether aSel is an instance method.

Return Value

An objc_method_description structure that describes the method specified by aSel, isRequiredMethod, and isInstanceMethod for the protocol p.

If the protocol does not contain the specified method, returns an objc_method_description structure with the value {NULL, NULL}.

See Also

Working with Protocols

objc_getProtocol

Returns a specified protocol.

objc_copyProtocolList

Returns an array of all the protocols known to the runtime.

objc_allocateProtocol

Creates a new protocol instance.

objc_registerProtocol

Registers a newly created protocol with the Objective-C runtime.

protocol_addMethodDescription

Adds a method to a protocol.

protocol_addProtocol

Adds a registered protocol to another protocol that is under construction.

protocol_addProperty

Adds a property to a protocol that is under construction.

protocol_getName

Returns a the name of a protocol.

protocol_isEqual

Returns a Boolean value that indicates whether two protocols are equal.

protocol_copyMethodDescriptionList

Returns an array of method descriptions of methods meeting a given specification for a given protocol.

protocol_copyPropertyList

Returns an array of the properties declared by a protocol.

protocol_getProperty

Returns the specified property of a given protocol.

protocol_copyProtocolList

Returns an array of the protocols adopted by a protocol.

protocol_conformsToProtocol

Returns a Boolean value that indicates whether one protocol conforms to another protocol.