- Download this repository
- Move the
visibilitycheckerfolder into your top-level package so that all sub-packages can be checked as well. For example, if the files you want checking are in the packagemypackage, then movevisibilitycheckerinto themypackagefolder - Refactor the 1st line of all .java files to conform with your package structure. So if you moved it to
mypackage, changepackage visibilitychecker;topackage mypackage.visibilitychecker;on the first line. If you copy and paste straight into IntelliJ, then you may get an option to automatically refactor thevisibilitycheckerpackage. - Run the
mainmethod inVisibilityChecker
Note that this code assumes that your root package is not in a sources root folder (folder highlighted blue in IntelliJ). If it is, you may change this in the Directory class at the field _sourcesRoot to what your source folder is named.