evant / kotlin-inject

Dependency injection lib for kotlin
Apache License 2.0
1.29k stars 60 forks source link

Allows annotating types with a qualifier #384

Closed evant closed 5 months ago

evant commented 6 months ago
@Inject(@Qualifier("a") a: String)

and

@Inject(a: @Qualifier("a") String)

are equivalent.

For now, only annotating the outer type (no type args) is supported.

This lays the groundwork for allowing

typealias A = @Qualifier("a") String

to work in the future when typealias no longer work as a qualifier by itself.

Relates to #253