I used to be incredibly bad at restricting access to my variables/methods/classes , I usually did not use the public, but I could not.
I'm just wondering if there is any tool - a plugin, external or other - that can search your source code, find what calls your variables/methods/classes , and change the visibility if it is too high.
So, for example, if I had an open variable and did not call anything from this class, then the tool would reduce its access to the closed one.
Mostly I need this for some of my old projects that have many public variables. It would take me a long time to sift them all and it would be extremely unpleasant / inefficient to leave them public when I return to these projects to work on them again.
source share