Reputation: 397
i'm studying jatpack Compose and trying to read some source code of it. Noticed the Compose annotation is critical in this framework so i want to read the code generated by it to check what is actually done within it. However i cant find where the code locate, and since it's a quit new stuff, nothing could be found through out the internet. Beg for your idea, thanks!
Upvotes: 0
Views: 1425
Reputation: 2937
That is a big topic.
The @Composable annotation is not processed by an Annotation Processor that generates source code. Instead Google had built a Kotlin Compiler Plugin that processes the annotation and weaves its magic into the compiled code directly.
Leland Richardson is the engineer that works on this and has explained a lot of what happens behind the curtains. For example, start here:
http://intelligiblebabble.com/compose-from-first-principles/
Upvotes: 6