actionscript-3 – 如何在AS3中获取类的别名字符串?

var alias:String = 'models.User';
registerClassAlias(alias, models.User);

// If I have the alias, then
// I can get the class like this:
var klass:Class = flash.net.getClassByAlias(alias);

// How do I do the reverse
// (get the alias from the class)?
//
// I want to do this, but I can't find a 
// 'getAliasByClass' function.
alias = getAliasByClass(klass);

最佳答案 看看
flash.utils.describeType()

点赞