5 Replies Latest reply on Nov 15, 2010 11:02 PM by Flex harUI

    describeType limitations

    richard.szalay Level 1
      I am developing a dynamic mocking framework, asmock, and am running up against a few limitations in the information returned by flash.utils.describeType.

      The main pieces of information I am missing are (in order of importance):
      - Methods that use rest (...) arguments
      - The default value for optional arguments
      - Whether a member (method/accessor) in a class is marked as final.

      Final methods are not causing me any issues as the AVM2 does not validate these methods and thus can be safely overriden in a mock object. But getting this information would allow me to honour the usage of the final keyword.

      Is there any simple way of obtaining this information? And if not, is there a way of me accessing any of the following:
      - A list of all applicationDomains in the application
      - The LoaderInfo for any/all loaded libraries (INCLUDING the system player, ie. Boolean, String, etc) - enabling me to access its bytes property and allowing me to parse its DoABC tag so I can get the information myself.

      Any help in making my framework more complete would be appreciated, and would also give me the final bits of information I need to fork the ABC emitting code into its own framework.

      Many thanks,
      Richard Szalay