获取到函数的函数名

代码
function showMethodName(thisObj:Object, method:Function):String
{
    var xml:XML 
=  describeType(thisObj);
    var xmlList:XMLList 
=  xml.method.@name;
    
for  each(var j:String in xmlList)
    {
        
if (method  ==  thisObj[j])
            retrun j;
    }
    
return   null ;
}

function hhh()
{
    trace(showMethodName(
this ,arguments.callee))
    
// hhh
}

 

你可能感兴趣的:(函数)