protocol_copyMethodDescriptionList(_:_:_:_:)
Returns an array of method descriptions of methods meeting a given specification for a given protocol.
Declaration
func protocol_copyMethodDescriptionList(_ proto: Protocol, _ isRequiredMethod: Bool, _ isInstanceMethod: Bool, _ outCount: UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<objc_method_description>?Parameters
- proto:
A protocol.
- isRequiredMethod:
A Boolean value that indicates whether returned methods should be required methods (pass Yes to specify required methods).
- isInstanceMethod:
A Boolean value that indicates whether returned methods should be instance methods (pass Yes 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().
Discussion
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.
See Also
Working with Protocols
objc_getProtocol(_:)objc_copyProtocolList(_:)objc_allocateProtocol(_:)objc_registerProtocol(_:)protocol_addMethodDescription(_:_:_:_:_:)protocol_addProtocol(_:_:)protocol_addProperty(_:_:_:_:_:_:)protocol_getName(_:)protocol_isEqual(_:_:)protocol_getMethodDescription(_:_:_:_:)protocol_copyPropertyList(_:_:)protocol_getProperty(_:_:_:_:)protocol_copyProtocolList(_:_:)protocol_conformsToProtocol(_:_:)