Interrogating Objects

Have you wanted to know more about a object and been a bit stymied by instanceof? I know I don’t want to have to test the object against every possiblity – I just want to know what class it comes from!

Then I looked into the flash.utils package. We now have getQualifiedClassName, getQualifiedSuperclassName, and the quite amazing describeType – which returns a full XML description of an object.

If it turns out you need to go in the other direction – you have the name of a class as a string and need to get a reference to actual class you can use the new getDefinitionByName.

no comments

  • No comments yet.