On the Applicability of Annotation-Based Source Code Modification in Kotlin (Work in Progress)
Annotations add metadata to source code entities such as classes or functions, which later can be processed by so-called annotation processors to, for example, modify the annotated program's source code.
While annotation processing has been well-explored in Java, the Kotlin community still lacks a comprehensive summary.
Thus, in this paper, we summarize the main approaches available in Kotlin: (1) Compile-time annotation processing using (a)~Kotlin Annotation Processing Tool (KAPT), (b) Kotlin Symbolic Processing (KSP), or (c) writing a custom Kotlin Compiler plugin; as well as (2) load-time code modification using an agent or a custom class loader.
We provide proof-of-concept implementations, discuss advantages and disadvantages, and specifically focus on how well each approach supports modifying the annotated source code.
This should help developers and researchers to better decide when to use which approach.
Sun 22 OctDisplayed time zone: Lisbon change
09:00 - 10:30 | |||
09:00 5mDay opening | Welcome from the Chairs MPLR | ||
09:05 55mKeynote | Is Wasm Becoming Garbage? (Keynote) MPLR DOI | ||
10:00 15mTalk | On the Applicability of Annotation-Based Source Code Modification in Kotlin (Work in Progress) MPLR DOI | ||
10:15 15mTalk | CloudJIT: A Just-in-Time FaaS Optimizer (Work in Progress) MPLR Serhii Ivanenko INESC-ID; IST-ULisboa, Rodrigo Bruno INESC-ID - IST-ULisboa, Jovan Stevanovic Oracle Labs, Luís Veiga INESC-ID; IST-ULisboa, Vojin Jovanovic Oracle Labs DOI |