RKPropertyInspector Class Reference
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 and types 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
-
+ sharedInspector
Returns the shared property inspector singleton instance.
Retrieving the Properties and Types for a Class
-
– propertyNamesAndTypesForClass:
Returns a dictionary of names and types for the properties of a given class.
-
– classForPropertyNamed:ofClass:
Returns the
Class
object specifying the type of the property with given name on a class.
CoreData Methods
-
– propertyNamesAndClassesForEntity:
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.
Instance Methods
classForPropertyNamed:ofClass:
Returns the Class
object specifying the type of the property with given name on a class.
- (Class)classForPropertyNamed:(NSString *)propertyName ofClass:(Class)objectClass
Parameters
- propertyName
The name of the property to retrieve the type of.
- objectClass
The class to retrieve the property from.
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
propertyNamesAndClassesForEntity:
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 *)propertyNamesAndClassesForEntity:(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
propertyNamesAndTypesForClass:
Returns a dictionary of names and types for the properties of a given class.
- (NSDictionary *)propertyNamesAndTypesForClass:(Class)objectClass
Parameters
- objectClass
The class to retrieve the property name and types for.
Return Value
A dictionary containing metadata about the properties of the given class, where the keys in the dictionary are the property names and the values are Class
objects specifying the type of the property.
Declared In
RKPropertyInspector.h