Inherits from NSObject
Declared in DixieRunTimeHelper.h
DixieRunTimeHelper.m

Overview

Helper to generate behaviour implementation, transparently call implementations and provide Runtime informations

Class Methods

argumentsFor:originalArguments:

  • Parses a variadic list into array of objects
+ (NSArray *)argumentsFor:(id)signature originalArguments:(id)arguments

Discussion

  • Parses a variadic list into array of objects

Note: The current solution handles only object,selector,BOOL and char types. * * @param signature The signature to determine the type of parameters in the variadic list * @param arguments The variadic list * * @return Array of parsed objects

Declared In

DixieRunTimeHelper.m

blockForSignature:block:

Returns a block implementation for a given signature

+ (id)blockForSignature:(id)signature block:(id)block

Parameters

signature

The method signature

block

The body of the block implementation

Return Value

A block, that matches the signature and calls the block

Discussion

Returns a block implementation for a given signature

Declared In

DixieRunTimeHelper.m

callImplementation:on:chaosContext:environment:

Calls the implementation pointer

+ (void)callImplementation:(id)implementation on:(id)puppet chaosContext:(id)chaosContext environment:(id)environment

Parameters

implementation

The IMP pointer to call

puppet

The receiver of the ObjC message

chaosContext

The context of the behaviour

environment

The environment of the method’s implementation call

Discussion

Calls the implementation pointer

Declared In

DixieRunTimeHelper.h

classForMethodInfo:

Returns the class for the method described in the MethodInfo.

+ (Class)classForMethodInfo:(id)methodInfo

Parameters

methodInfo

Describes the target class and it’s method

Return Value

A Class object for instance methods and meta class object for class methods

Discussion

Returns the class for the method described in the MethodInfo.

Declared In

DixieRunTimeHelper.h

implementationWithChaosContext:environment:

Generates an implementation pointer that confirms to the chaosContext and block

+ (IMP)implementationWithChaosContext:(id)chaosContext environment:(id)block

Parameters

chaosContext

The context of the implementation

block

Block for the body of the implementation pointer

Return Value

the implementation pointer

Discussion

Generates an implementation pointer that confirms to the chaosContext and block

Declared In

DixieRunTimeHelper.h

methodForMethodInfo:

Returns the Method pointer for a given MethodInfo object

+ (Method)methodForMethodInfo:(id)methodInfo

Parameters

methodInfo

Describes the target class and it’s method

Return Value

The Method pointer

Discussion

Returns the Method pointer for a given MethodInfo object

Declared In

DixieRunTimeHelper.h

methodTypeEncodingForMethodInfo:

Returns the string representation of the method encoding describes by the MethodInfo object

+ (const char *)methodTypeEncodingForMethodInfo:(id)methodInfo

Parameters

methodInfo

Describes the target class and it’s method

Return Value

the string representation of the method encoding

Discussion

Returns the string representation of the method encoding describes by the MethodInfo object

Declared In

DixieRunTimeHelper.h

objectFromNext:type:

Converts the next item in the variadic arguments list into subclass of NSObjects

+ (id)objectFromNext:(id)arguments type:(id)argType

Parameters

arguments

The variadic list

argType

the expected type of the next item

Return Value

An NSObject subclass that represents the argument

Discussion

Converts the next item in the variadic arguments list into subclass of NSObjects

Note: We are using core foundation factories here, NSNumber, NSString might be swizzled

Declared In

DixieRunTimeHelper.m

selectorsForClass:

Collects the runtime public methodnames for a given class

+ (NSArray *)selectorsForClass:(id)targetClass

Parameters

targetClass

The class

Return Value

Array of public selector strings

Discussion

Collects the runtime public methodnames for a given class

Declared In

DixieRunTimeHelper.h