...
[RT] Compile-time-data injection
...
...
- This is not yet a part of apache flex.
- This is in concept stage
Summary
Introduction of new Metadata Tags that instruct the compiler to fill-in arguments or properties with data that is available at compile-time.
...
Code is right now introspected using describeType, exception stack-traces (that only work in the debug players) and passing data by hand. Also: Developers need to set up ant tasks to pass in data like the build version or compiler flags or need to do some code twisting for it to work. If some of the data was compiled into the bytecode then performance could be traded for swf size. This is specially interesting for low-level apis like logging or dependency injection. All this could be achieved by including all compiler data into a swf but this would result in unnecessarily bloated swfs. An approach using meta-data would allow selective injection for those parts that are needed.
Mailinglist discussions
Trace & Log
Proposal Compile-time-data-injection
Available data
Type
Information about classes, their methods and those arguments. Basically things that are right now available with describeType
and getQualifiedClassName
.
...
key | description | type | |
---|---|---|---|
caller.type | Type in which the calling method was located | Type | |
caller.args | The arguments that have been passed to the caller | Array | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6bdfcfb4-d728-4a30-8a43-73c744db77f8"><ac:plain-text-body><![CDATA[ | call.clean | Called clean like | Boolean ]]></ac:plain-text-body></ac:structured-macro> |
call.lineNo | The line number of the file of the type where the method has been called | int | |
call.preferedReturnType | Type that the code wants to work with afterwards | Type | |
call.args | Types passed in for all arguments | Array | |
call.arg.<argument> | Type for a particular argument | Type |
...