/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
- i;10;CPObject.ji;13;CPException.jc;2623;
- var _1=objj_allocateClassPair(CPObject,"CPInvocation"),_2=_1.isa;
- class_addIvars(_1,[new objj_ivar("_returnValue"),new objj_ivar("_arguments"),new objj_ivar("_methodSignature")]);
- objj_registerClassPair(_1);
- objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
- class_addMethods(_1,[new objj_method(sel_getUid("initWithMethodSignature:"),function(_3,_4,_5){
- with(_3){
- _3=objj_msgSendSuper({receiver:_3,super_class:objj_getClass("CPObject")},"init");
- if(_3){
- _arguments=[];
- _methodSignature=_5;
- }
- return _3;
- }
- }),new objj_method(sel_getUid("setSelector:"),function(_6,_7,_8){
- with(_6){
- _arguments[1]=_8;
- }
- }),new objj_method(sel_getUid("selector"),function(_9,_a){
- with(_9){
- return _arguments[1];
- }
- }),new objj_method(sel_getUid("setTarget:"),function(_b,_c,_d){
- with(_b){
- _arguments[0]=_d;
- }
- }),new objj_method(sel_getUid("target"),function(_e,_f){
- with(_e){
- return _arguments[0];
- }
- }),new objj_method(sel_getUid("setArgument:atIndex:"),function(_10,_11,_12,_13){
- with(_10){
- _arguments[_13]=_12;
- }
- }),new objj_method(sel_getUid("argumentAtIndex:"),function(_14,_15,_16){
- with(_14){
- return _arguments[_16];
- }
- }),new objj_method(sel_getUid("setReturnValue:"),function(_17,_18,_19){
- with(_17){
- _returnValue=_19;
- }
- }),new objj_method(sel_getUid("returnValue"),function(_1a,_1b){
- with(_1a){
- return _returnValue;
- }
- }),new objj_method(sel_getUid("invoke"),function(_1c,_1d){
- with(_1c){
- _returnValue=objj_msgSend.apply(objj_msgSend,_arguments);
- }
- }),new objj_method(sel_getUid("invokeWithTarget:"),function(_1e,_1f,_20){
- with(_1e){
- _arguments[0]=_20;
- _returnValue=objj_msgSend.apply(objj_msgSend,_arguments);
- }
- })]);
- class_addMethods(_2,[new objj_method(sel_getUid("invocationWithMethodSignature:"),function(_21,_22,_23){
- with(_21){
- return objj_msgSend(objj_msgSend(_21,"alloc"),"initWithMethodSignature:",_23);
- }
- })]);
- var _24="CPInvocationArguments",_25="CPInvocationReturnValue";
- var _1=objj_getClass("CPInvocation");
- if(!_1){
- objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"CPInvocation\""));
- }
- var _2=_1.isa;
- class_addMethods(_1,[new objj_method(sel_getUid("initWithCoder:"),function(_26,_27,_28){
- with(_26){
- _26=objj_msgSendSuper({receiver:_26,super_class:objj_getClass("CPObject")},"init");
- if(_26){
- _returnValue=objj_msgSend(_28,"decodeObjectForKey:",_25);
- _arguments=objj_msgSend(_28,"decodeObjectForKey:",_24);
- }
- return _26;
- }
- }),new objj_method(sel_getUid("encodeWithCoder:"),function(_29,_2a,_2b){
- with(_29){
- objj_msgSend(_2b,"encodeObject:forKey:",_returnValue,_25);
- objj_msgSend(_2b,"encodeObject:forKey:",_arguments,_24);
- }
- })]);