Inherits from NSObject
Declared in RKPropertyInspector.h

Overview

The RKPropertyInspector class provides an interface for introspecting the properties and attributes of classes using the reflection capabilities of the Objective-C runtime. Once inspected, the properties inspection details are cached.

The CoreData category augments the RKPropertyInspector class with support for introspecting the property types for NSManagedObject and NSEntityDescription objects.

Tasks

Retrieving the Shared Inspector Instance

Retrieving the Properties and Types for a Class

  • – propertyInspectionForClass:

    Returns a dictionary keyed by property name that includes the key-value coding class of the property and a Boolean indicating if the property is backed by a primitive (non-object) value. The dictionary for each property includes details about the key-value coding class representing the property and if the property is backed by a primitive type.

  • – classForPropertyNamed:ofClass:isPrimitive:

    Returns the Class object specifying the type of the property with given name on a class.

CoreData Methods

  • – propertyInspectionForEntity:

    Returns a dictionary wherein the keys are the names of attribute and relationship properties and the values are the class used to represent the corresponding property for a given entity.

  • – classForPropertyNamed:ofEntity:

    Returns the class used to represent the property with the given name on the given entity.

Class Methods

sharedInspector

Returns the shared property inspector singleton instance.

+ (RKPropertyInspector *)sharedInspector

Return Value

The shared RKPropertyInspector instance.

Declared In

RKPropertyInspector.h

Instance Methods

classForPropertyNamed:ofClass:isPrimitive:

Returns the Class object specifying the type of the property with given name on a class.

- (Class)classForPropertyNamed:(NSString *)propertyName ofClass:(Class)objectClass isPrimitive:(BOOL *)isPrimitive

Parameters

propertyName

The name of the property to retrieve the type of.

objectClass

The class to retrieve the property from.

isPrimitive

A pointer to a Boolean value to set indicating if the specified property is of a primitive (non-object) type.

Return Value

A Class object specifying the type of the requested property.

Declared In

RKPropertyInspector.h

classForPropertyNamed:ofEntity:

Returns the class used to represent the property with the given name on the given entity.

- (Class)classForPropertyNamed:(NSString *)propertyName ofEntity:(NSEntityDescription *)entity

Parameters

propertyName

The name of the property to retrieve the class for.

entity

The entity containing the property to retrieve the class for.

Return Value

The class used to represent the property.

Declared In

RKPropertyInspector+CoreData.h

propertyInspectionForClass:

Returns a dictionary keyed by property name that includes the key-value coding class of the property and a Boolean indicating if the property is backed by a primitive (non-object) value. The dictionary for each property includes details about the key-value coding class representing the property and if the property is backed by a primitive type.

- (NSDictionary *)propertyInspectionForClass:(Class)objectClass

Parameters

objectClass

The class to inspect the properties of.

Return Value

A dictionary keyed by property name that includes details about all declared properties of the class.

Declared In

RKPropertyInspector.h

propertyInspectionForEntity:

Returns a dictionary wherein the keys are the names of attribute and relationship properties and the values are the class used to represent the corresponding property for a given entity.

- (NSDictionary *)propertyInspectionForEntity:(NSEntityDescription *)entity

Parameters

entity

The entity to retrieve the properties names and classes of.

Return Value

A dictionary containing the names and classes of the given entity.

Declared In

RKPropertyInspector+CoreData.h