Introspection

Introspection refers to the inherent ability of an object to divulge, upon request, its essential characteristics at runtime. By sending objects certain messages, you can ask them questions about themselves as objects and the Objective-C runtime provides you with answers. Introspection is an important coding tool because it makes your programs more efficient and robust. Here are a couple of examples of how introspection might be useful:

Introspection

Types of Introspection Information

The NSObject protocol, which is adopted by the NSObject class, defines introspection methods that yield the following kinds of information about an object:

Prerequisite Articles

Did this document help you? Yes It's good, but... Not helpful...


Last updated: 2010-08-03