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
Android: Introduction Android Support Annotations
Search
Sato Shun
August 11, 2015
Programming
150
0
Share
Android: Introduction Android Support Annotations
Sato Shun
August 11, 2015
More Decks by Sato Shun
See All by Sato Shun
Kotlin Nativeにおけるfrozen状態と並行処理について
satoshun
0
1k
DroidKaigi 2020: System UIをコントロールして、 画面を最大限に生かしたアプリを構築する / Build apps that make the best uses of device screens by controlling System UI
satoshun
4
1.9k
タップルでたっぷりDaggerを使って マルチモジュール構築している話 :)
satoshun
2
2.6k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
7k
R8/ProGuard 徹底比較
satoshun
8
4.3k
Android: Daggear2でDI
satoshun
0
180
Other Decks in Programming
See All in Programming
The Less-Told Story of Socket Timeouts
coe401_
3
1.1k
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
340
継続的な負荷検証を目指して
pyama86
3
1k
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
Explore CoroutineScope
tomoeng11
0
180
Agent Skills を社内で育てる仕組み作り
jackchuka
1
1.8k
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.6k
Making the RBS Parser Faster
soutaro
0
680
AIと共に生きる技術選定 2026
sgash708
0
130
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.1k
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
ハーネスエンジニアリングとは?
kinopeee
13
6.9k
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
360
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
36
We Are The Robots
honzajavorek
0
220
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
110
Into the Great Unknown - MozCon
thekraken
41
2.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
AI: The stuff that nobody shows you
jnunemaker
PRO
6
630
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
We Have a Design System, Now What?
morganepeng
55
8.1k
Designing for Performance
lara
611
70k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Transcript
Android Support Annotationsの紹介 potatotips#20 2015/8/11 佐藤 隼
Jake先生のRxBindingリポジトリを見てみると...
Android Support Annotations? Android開発において, 役に立つannotationが 定義されているライブラリ
IntDef/StringDef 複数の定数から, 論理的な型を宣言 enumの代わりに使う. 列挙パターンにenumを使うのはバッドプ ラクティス
IntRange/FloatRange 定義域を宣言
Size 配列のサイズを宣言(min, maxも可)
RequiresPermission 呼び出すのに必要なpermissionを宣言
CallSuper サブクラスがメソッドを呼び出さなければならないこ とを宣言
UiThread/WorkerThread UI(Worker)スレッドか ら呼び出さなければな らないことを宣言
- LayoutRes, StringRes, ColorRes, … - 特定のresourceのみを受け入れることを宣言 - Keep -
proguardを無視することを宣言 - CheckResult - 返り値を使わなければいけない - VisibleForTesting - testのためにaccess可視性を広げていることを宣言 - Nullable, NonNull - Nullを許さない(許す)ことを宣言.
- 適切にannotationをつけることで, ドキュメント の一部になると共に, バグの軽減が期待できる - Kotlinの波がキテる? まとめ
参考 - https://developer.android. com/intl/ja/tools/debugging/annota tions.html - http://tools.android.com/tech- docs/support-annotations