Flex: how do you specify private class attributes?

I am trying to serialize objects with my private attributes in Flex.

The introspection API does not seem to allow: "The describeType () method returns only public members. The method does not return private members of the caller's superclass or any other class where the caller is not an instance."

Is there any other way for an instance to find out the name of its private members?

+4
source share
1 answer

Unfortunately, the describeType () method is the only way to do introspection in Flex. People write wrappers around it, and if you want to do introspection, I would recommend as3-commons-reflection , but there is no way to list the private attributes of a class without being able to access them, even if you can list them.

+3
source

Source: https://habr.com/ru/post/1312541/


All Articles