There were times when people used to declare a type variable,
int i1, i2, i3;
This is no longer considered best practice, but announces that each of them individually increases readability .
Coming to your question, like mrembisz said that this should happen, should happen in the source files. In other words, the java compiler must change to handle such a script .
Turning to readability, your solution will only increase code clutter and decrease readability , suppose I have 10 beans injected, each time I need to see the code above and below to know if it is automatically connected or not.
So, I doubt it is worth the time or not.
source share