Using describeType should be possible:
public class Constants { static public const CONST_1 :String = "CONST_1"; static public const CONST_A :String = "CONST_A"; } var xmlList:XMLList = describeType(Constants).child("constant"); var constantsArray:Array = []; for each(var key:XML in xmlList) { constantsArray.push(key.attribute("name")); }
source share