Sha256: 003499e8f8e5c89f6493c7b10832f0169d3477bf3bcbda7dec945601e5316955
Contents?: true
Size: 879 Bytes
Versions: 3
Compression:
Stored size: 879 Bytes
Contents
package com.fourD.core { import flash.utils.getQualifiedClassName; public class MethodCaller { public function call(instance:*, method:String, args:*):* { var returnValue:*; var parameters:Array = args as Array; trace("METHOD CALLER\n" + instance); trace("instance = " + flash.utils.getQualifiedClassName(instance)); trace("method = " + method); if(!instance) { } else if(!method) { } else if(!instance.hasOwnProperty(method)) { } else if(!(instance[method] is Function)) { } else { try { if(!parameters) { returnValue = instance[method](); } else { returnValue = (instance[method] as Function).apply(instance, parameters); } } catch(error:ArgumentError) { } catch(error:TypeError) { } } return returnValue; } } }
Version data entries
3 entries across 3 versions & 1 rubygems