Function
関数
objc_getClass
Returns the class definition of a specified class.
Technology
- Objective-C Runtime
Objective-Cランタイム
Declaration
宣言
id objc_getClass(const char *name);
Parameters
パラメータ
name
The name of the class to look up.
Return Value
戻り値
The Class object for the named class, or nil
if the class is not registered with the Objective-C runtime.
Discussion
解説
objc_getClass
is different from objc_lookUpClass
in that if the class is not registered, objc_getClass
calls the class handler callback and then checks a second time to see whether the class is registered. objc_lookUpClass
does not call the class handler callback.
Special Considerations
特別な注意事項
Earlier implementations of this function (prior to OS X v10.0) terminate the program if the class does not exist.
See Also
参照
Obtaining Class Definitions
objc_copyClassList
Creates and returns a list of pointers to all registered class definitions.