Is this still the nicest (or only) syntax for mult...
# announcements
g
Is this still the nicest (or only) syntax for multiple annotations on a field?
Copy code
@field:[Inject Named("ActiveBudgetId")] internal lateinit var activeBudgetId: String
Not quite as nice as the Java equivalent
Copy code
@Inject @Named("ActiveBudgetId") String activeBudgetId;
o
grahamborland: Have you tried
@field:Inject @field:Named("ActiveBudgedId")
?
g
Ah, that works. Also, just
@Inject @field:Named(”ActiveBudgetId”)
works nicely as well. Thanks!
o
yep
I'm not entirely sure about the rules, but I think if an annotation could only possibly have one target within the given context, you don't need to specify the target (@field:)