Type Method

classDescriptionForClass:

Returns the class description for a given class.

Declaration

+ (NSClassDescription *)classDescriptionForClass:(Class)aClass;

Parameters

aClass

The class for which to return a class description. See note below for important details.

Return Value

The class description for aClass, or nil if a class description cannot be found.

Discussion

If a class description for aClass is not found, the method posts an NSClassDescriptionNeededForClassNotification on behalf of aClass, allowing an observer to register a class description. The method then checks for a class description again. Returns nil if a class description is still not found.

If you have an instance of the receiver’s class, you can use the NSObject instance method classDescription instead.

See Also

Working with class descriptions

+ invalidateClassDescriptionCache

Removes all NSClassDescription objects from the cache.

+ registerClassDescription:forClass:

Registers an NSClassDescription object for a given class in the NSClassDescription cache.