在 Flex 中处理 ActionScript 中的元数据有两个一般方向:
There is two general directions to deal with metadata in ActionScript in Flex:
- 使用反射(或 Adobe 的自省)处理运行时.您可以在此处找到文档.有几个第三方库提供了更方便的反射 API,例如 as3-commons-reflect 或 Parsley 中的反射 API.
- 使用自 Flex 4 SDK 修订版 8165 起引入的 Flex 编译器扩展(请参阅详细信息一>).另请参阅相应的讨论和官方文档.
- Dealing in runtime using reflection (or introspection in terms of Adobe). You can find documentation here. There are several third-party libraries which provides more convenient reflection API such as as3-commons-reflect or reflection API in Parsley.
- Using Flex Compiler Extensions which was introduced since Flex 4 SDK revision 8165 (see details). See also the corresponding discussion and official documentation.