ExampleApplication : Application() { private val component: AppComponent by lazy { DaggerAppComponent .builder() .appModule(AppModule(this)) .build() } override fun onCreate() { super.onCreate() component.inject(this) } } Dagger will give you this class in COMPILE-TIME (if everything goes correctly)
Do not modify! package com.barteklipinski.sample; // imports … public final class MainActivity_ViewBinding implements Unbinder { // … class contents } Re2ection bridge
Do not modify! package com.barteklipinski.sample; // imports … public final class MainActivity_ViewBinding implements Unbinder { // … class contents } Re2ection bridge
Do not modify! package com.barteklipinski.sample; // imports … public final class MainActivity_ViewBinding implements Unbinder { // … class contents } Re2ection bridge
Do not modify! package com.barteklipinski.sample; // imports … public final class MainActivity_ViewBinding implements Unbinder { // … class contents } Re2ection bridge
• return those instances in a form of the Unbinder inteBace “ReDection bridge” approach val unbinder : Unbinder = ButterKnife.bind(target) Re2ection bridge
code. They can only generate new code. fun String.toUpperCamelCase(): String { // convert… } add* behaviour to existing classes (without modifying them) "DROIDcon ItAly".toUpperCamelCase() // == “DroidconItaly” Receiver Type