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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
「速くなった気がする」をデータで疑う
senleaf24
0
150
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
1.8k
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
270
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
260
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
980
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
170
의존성 주입과 모듈화
fornewid
0
110
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
300
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
510
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
100
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Why Our Code Smells
bkeepers
PRO
340
58k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
[SF Ruby Conf 2025] Rails X
palkan
2
930
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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