flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject [FLEXJS][FALCONJX] Reflection/Metadata
Date Mon, 01 Feb 2016 16:15:45 GMT

I just pushed changes to try to support reflection and metadata in FlexJS
via a new Reflection.swc and new generated code from FalconJX.  You should
be able to use org.apache.flex.reflection.describeType() to get a data
structure (instead of XML like in the regular Flex SDK) and retrieve
metadata that way.  I think there are still bugs in the implementation,
especially dealing with static vs instance properties, but simple tests
are working for me.  I'll be using this in the Spark-like component set
I'm playing with for FlexJS.

One interesting thing about the way I've currently coded this:  FalconJX
now outputs a FLEXJS_REFLECTION_INFO function() as well as the
FLEXJS_CLASS_INFO structure on every class.  By generating
FLEXJS_REFLECTION_INFO as a function instead of a structure, the Google
Closure Compiler seems to be able to tell if you are using reflection in
the app and optimizes out the function and all of its related data so you
only pay the cost of that extra function and data if you are using it.


View raw message