Function 関数

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 パラメータ

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.

See Also 参照

Working with Protocols プロトコルを扱う