Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Traitement des annotations en Kotlin
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yves Kalume
February 24, 2023
Programming
35
1
Share
Traitement des annotations en Kotlin
Yves Kalume
February 24, 2023
More Decks by Yves Kalume
See All by Yves Kalume
Bringing AI to Android With Gemini
yveskalume
0
3
Dompting the Elephant: Making Sense of Gradle for Android Developers
yveskalume
0
31
Practical AI for Android Developers with Android Studio’s AI Agent
yveskalume
0
15
Designing scalable Compose APIs
yveskalume
1
150
Demystifying Memory Leaks in Android
yveskalume
2
130
L’essentiel de Git et Github en max 20 minutes
yveskalume
1
54
Modern Android Architecture
yveskalume
1
100
GDSC Alumni retour d’experience
yveskalume
0
29
Premier pas avec Jetpack compose
yveskalume
0
20
Other Decks in Programming
See All in Programming
Claude Codeログ基盤の構築
giginet
PRO
7
3.9k
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
140
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
220
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
PHPで TLSのプロトコルを実装してみる
higaki_program
0
730
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
390
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
150
Java 21/25 Virtual Threads 소개
debop
0
320
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
820
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
110
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
340
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
780
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
280
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
320
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
We Have a Design System, Now What?
morganepeng
55
8.1k
Transcript
Traitement des annotations en Kotlin Yves Kalume (@kalumeyves) Développeur Mobile
@Composable fun HomeScreen() @OptIn(ExperimentalPagerApi.:class) @Devscat @SuppressWarnings("deprecation") @Deprecated @Configuration @Autowired Annotation
Processing
Une annotation permet au programmeur d'intégrer des informations supplémentaires dans
un code source.
Déclaration d’une annotation annotation class Devscast @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE)
Utilisation d’une annotation @Devscast class Foo(val id: Int, val name:
String) fun main() { val annotations = Foo.:class.annotations print(annotations) ./ [] une liste vide... pourquoi ? }
Kotlin Symbol Processing (KSP)
KSP en action dependencies { implementation("com.google.devtools.ksp:symbol-processing-api:1.8.10-1.0.9") }
src/main/resources/META-INF/services/
Fournisseur de processeur class DevscastProcessorProvider : SymbolProcessorProvider { override fun
create( environment: SymbolProcessorEnvironment ): SymbolProcessor { return DevscastProcessor(environment) } }
Processeur class ListedProcessor( private val environment: SymbolProcessorEnvironment ) : SymbolProcessor
{ override fun process(resolver: Resolver): List<KSAnnotated>{ ./ traitement } }
val result = resolver.getSymbolsWithAnnotation( Devscast.:class.qualifiedName.toString() ) ./ ... return result.filterNot
{ it.validate() }.toList()
Prêt à être utilisée
dependencies { implementation(project(":lib") ) ksp(project(":lib")) } android { kotlin {
sourceSets.debug { kotlin.srcDirs += 'build/generated/ksp/debug/kotlin' } sourceSets.release { kotlin.srcDirs += 'build/generated/ksp/release/kotlin' } } }
Merci ! Yves Kalume - @kalumeyves Développeur Mobile