dimsuz
02/24/2022, 2:19 PM@SingleIn
in Anvil's sample. I wonder will dagger differentiate @SingleIn(Scope1::class)
and @SingleIn(Scope2::class)
during code generation (and after) as different scopes? JSR docs seem to mention that @Scope
-ed annotations shouldn't have attributes, so I thought does this mean dagger will look only at annotation name?Zac Sweers
02/24/2022, 2:36 PMtrevjones
02/25/2022, 3:41 AMZac Sweers
02/25/2022, 4:41 AMZac Sweers
02/25/2022, 4:41 AMZac Sweers
02/25/2022, 4:41 AM/**
* Indicates that this provided type (via [Provides], [Binds], [Inject], etc) will only have a single instance within
* the target [value] scope.
*
* Note that the [value] does not actually need to be a [Scope]-annotated annotation class. It is _solely_ a key.
*/
@Scope
@MustBeDocumented
@Retention(RUNTIME)
annotation class SingleIn(val value: KClass<*>)
trevjones
02/25/2022, 4:42 AM