Is there some way to use a single annotation for multiple variables in Java? I have a class with a fairly large number of variables that all require the same annotation, and while I could copy paste the same annotation over and over, I am worried that this will affect the readability of my code.
I've tried searching everywhere but haven't found anything, leading me to believe that this likely isn't possible, but optimally it would be something like this; Instead of:
@Annotation
int var1;
@Annotation
int var2;
...
Something like:
@Annotation:
int var1;
int var2;
...
or maybe
@Annotation {
int var1;
int var2;
}