Function

protocol_copyMethodDescriptionList(_:_:_:_:)

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

Declaration

func protocol_copyMethodDescriptionList(_ p: Protocol!, _ isRequiredMethod: Bool, _ isInstanceMethod: Bool, _ outCount: UnsafeMutablePointer<UInt32>!) -> UnsafeMutablePointer<objc_method_description>!

Parameters

p

A protocol.

isRequiredMethod

A Boolean value that indicates whether returned methods should be required methods (pass true to specify required methods).

isInstanceMethod

A Boolean value that indicates whether returned methods should be instance methods (pass true to specify instance methods).

outCount

Upon return, contains the number of method description structures in the returned array.

Return Value

A C array of objc_method_description structures containing the names and types of p’s methods specified by isRequiredMethod and isInstanceMethod. The array contains *outCount pointers followed by a NULL terminator. You must free the list with free().

If the protocol declares no methods that meet the specification, NULL is returned and *outCount is 0.

Discussion

Methods in other protocols adopted by this protocol are not included.