PageRenderTime 18ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/Frameworks/Foundation/objj.platform/CPInvocation.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 82 lines | 82 code | 0 blank | 0 comment | 0 complexity | 40ad062bc53f0f738bb234e8f50d6d86 MD5 | raw file
 1i;10;CPObject.ji;13;CPException.jc;2623;
 2var _1=objj_allocateClassPair(CPObject,"CPInvocation"),_2=_1.isa;
 3class_addIvars(_1,[new objj_ivar("_returnValue"),new objj_ivar("_arguments"),new objj_ivar("_methodSignature")]);
 4objj_registerClassPair(_1);
 5objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 6class_addMethods(_1,[new objj_method(sel_getUid("initWithMethodSignature:"),function(_3,_4,_5){
 7with(_3){
 8_3=objj_msgSendSuper({receiver:_3,super_class:objj_getClass("CPObject")},"init");
 9if(_3){
10_arguments=[];
11_methodSignature=_5;
12}
13return _3;
14}
15}),new objj_method(sel_getUid("setSelector:"),function(_6,_7,_8){
16with(_6){
17_arguments[1]=_8;
18}
19}),new objj_method(sel_getUid("selector"),function(_9,_a){
20with(_9){
21return _arguments[1];
22}
23}),new objj_method(sel_getUid("setTarget:"),function(_b,_c,_d){
24with(_b){
25_arguments[0]=_d;
26}
27}),new objj_method(sel_getUid("target"),function(_e,_f){
28with(_e){
29return _arguments[0];
30}
31}),new objj_method(sel_getUid("setArgument:atIndex:"),function(_10,_11,_12,_13){
32with(_10){
33_arguments[_13]=_12;
34}
35}),new objj_method(sel_getUid("argumentAtIndex:"),function(_14,_15,_16){
36with(_14){
37return _arguments[_16];
38}
39}),new objj_method(sel_getUid("setReturnValue:"),function(_17,_18,_19){
40with(_17){
41_returnValue=_19;
42}
43}),new objj_method(sel_getUid("returnValue"),function(_1a,_1b){
44with(_1a){
45return _returnValue;
46}
47}),new objj_method(sel_getUid("invoke"),function(_1c,_1d){
48with(_1c){
49_returnValue=objj_msgSend.apply(objj_msgSend,_arguments);
50}
51}),new objj_method(sel_getUid("invokeWithTarget:"),function(_1e,_1f,_20){
52with(_1e){
53_arguments[0]=_20;
54_returnValue=objj_msgSend.apply(objj_msgSend,_arguments);
55}
56})]);
57class_addMethods(_2,[new objj_method(sel_getUid("invocationWithMethodSignature:"),function(_21,_22,_23){
58with(_21){
59return objj_msgSend(objj_msgSend(_21,"alloc"),"initWithMethodSignature:",_23);
60}
61})]);
62var _24="CPInvocationArguments",_25="CPInvocationReturnValue";
63var _1=objj_getClass("CPInvocation");
64if(!_1){
65objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"CPInvocation\""));
66}
67var _2=_1.isa;
68class_addMethods(_1,[new objj_method(sel_getUid("initWithCoder:"),function(_26,_27,_28){
69with(_26){
70_26=objj_msgSendSuper({receiver:_26,super_class:objj_getClass("CPObject")},"init");
71if(_26){
72_returnValue=objj_msgSend(_28,"decodeObjectForKey:",_25);
73_arguments=objj_msgSend(_28,"decodeObjectForKey:",_24);
74}
75return _26;
76}
77}),new objj_method(sel_getUid("encodeWithCoder:"),function(_29,_2a,_2b){
78with(_29){
79objj_msgSend(_2b,"encodeObject:forKey:",_returnValue,_25);
80objj_msgSend(_2b,"encodeObject:forKey:",_arguments,_24);
81}
82})]);