Currently, Dagger does not seem to support TYPE_USE qualifier target, so the following code does not compile:
...Provider<@Named("app.config") Properties>...
It would be great if Dagger supported TYPE_USE for @Qualifiers as the qualifier seems to belong to a type rather than method/field/class.
At the same time, it might be worth recommending TYPE_USE as the only target for @Qualifier implementations.
See:
Currently, Dagger does not seem to support
TYPE_USEqualifier target, so the following code does not compile:It would be great if Dagger supported
TYPE_USEfor@Qualifiersas the qualifier seems to belong to a type rather than method/field/class.At the same time, it might be worth recommending
TYPE_USEas the only target for@Qualifierimplementations.See:
TYPE_USEfor its@Qualifier. Note that it supportsFIELD,METHODand so on for backward compatibility, and I think newly-created qualifier annotations should not haveFIELD,METHOD, and the rest targets.TYPE_USEshould be the right target just like jspecify's@Nullable