logo
  • 教程列表
  • SO官方文檔
  • Kotlin 中的 @Named 註釋
    • 宣告合格的依賴項
    • 基於 Setter 的依賴注入
    • 基於建構函式的依賴注入
  1. StackOverflow 文件
  2. dagger-2 教程
  3. Kotlin 中的 @Named 註釋
  4. 基於建構函式的依賴注入

基於建構函式的依賴注入

Created: November-22, 2018

class MyClass @Inject constructor(@Named val answer: Int){
    /* The nuts and bolts of your class */
}
  • 基於 Setter 的依賴注入

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明