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
910
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
530
実践CRDT
tamadeveloper
0
610
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
190
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
150
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.1k
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
960
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
120
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.5k
Kingdom of the Machine
yui_knk
2
1.3k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
HDC tutorial
michielstock
2
650
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
Making Projects Easy
brettharned
120
6.6k
Unsuck your backbone
ammeep
672
58k
ラッコキーワード サービス紹介資料
rakko
1
3.2M
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Embracing the Ebb and Flow
colly
88
5k
Google's AI Overviews - The New Search
badams
0
990
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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