An object representation of a message. More...
Public Member Functions | |
(id) | - argumentAtIndex: [implementation] |
(void) | - encodeWithCoder: [implementation] |
(id) | - initWithCoder: [implementation] |
(id) | - initWithMethodSignature: [implementation] |
(void) | - invoke [implementation] |
(void) | - invokeWithTarget: [implementation] |
(id) | - returnValue [implementation] |
(SEL) | - selector [implementation] |
(void) | - setArgument:atIndex: [implementation] |
(void) | - setReturnValue: [implementation] |
(void) | - setSelector: [implementation] |
(void) | - setTarget: [implementation] |
(id) | - target [implementation] |
Static Public Member Functions | |
(id) | + invocationWithMethodSignature: [implementation] |
An object representation of a message.
A CPInvocation is an object representation of a message sent to an object.
Definition at line 34 of file CPInvocation.j.
- (id) argumentAtIndex: | (unsigned) | anIndex | [implementation] |
Returns the argument at the specified index. Arguments 0 and 1 are self
and _cmd
respectively. Thus, method arguments start at 2.
anIndex | the index of the argument to return |
CPInvalidArgumentException | if anIndex is greater than or equal to the invocation's number of arguments. |
Definition at line 121 of file CPInvocation.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
Writes out the invocation's data to the provided coder.
aCoder | the coder to which the data will be written |
Definition at line 191 of file CPInvocation.j.
- (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
Initializes the invocation with data from a coder.
aCoder | the coder from which to obtain initialization data |
Definition at line 174 of file CPInvocation.j.
- (id) initWithMethodSignature: | (CPMethodSignature) | aMethodSignature | [implementation] |
Initializes the invocation with a provided method signature
aMethodSignature | the signature of the method to message |
Definition at line 57 of file CPInvocation.j.
+ (id) invocationWithMethodSignature: | (CPMethodSignature) | aMethodSignature | [implementation] |
Returns a new CPInvocation that represents a message to a method.
aMethodSignature | the signature of the method to message |
Definition at line 47 of file CPInvocation.j.
- (void) invoke | [implementation] |
Sends the encapsulated message to the stored target.
Definition at line 147 of file CPInvocation.j.
- (void) invokeWithTarget: | (id) | aTarget | [implementation] |
Sends the encapsulated message to the specified target.
the | target to which the message will be sent |
Definition at line 156 of file CPInvocation.j.
- (id) returnValue | [implementation] |
Returns the invocation's return value
Definition at line 138 of file CPInvocation.j.
- (SEL) selector | [implementation] |
Returns the invocation's selector
Definition at line 83 of file CPInvocation.j.
- (void) setArgument: | (id) | anArgument | ||
atIndex: | (unsigned) | anIndex | ||
[implementation] |
Sets a method argument for the invocation. Arguments 0 and 1 are self
and _cmd
.
anArgument | the argument to add | |
anIndex | the index of the argument in the method |
Definition at line 110 of file CPInvocation.j.
- (void) setReturnValue: | (id) | aReturnValue | [implementation] |
Sets the invocation's return value
the | invocation return value |
Definition at line 130 of file CPInvocation.j.
- (void) setSelector: | (SEL) | aSelector | [implementation] |
Sets the invocation's selector.
the | invocation selector |
Definition at line 75 of file CPInvocation.j.
- (void) setTarget: | (id) | aTarget | [implementation] |
Sets the invocation's target
aTarget | the invocation target |
Definition at line 92 of file CPInvocation.j.
- (id) target | [implementation] |
Returns the invocation's target
Definition at line 100 of file CPInvocation.j.