As far as I know, Checkstyle cannot do this. However, there is a PMD rule called UnnecessaryFullyQualifiedName , which may be worth a look. IntelliJ plugins for PMD exist, such as QAPlug PMD , which can be downloaded for free.
Get ready to see a lot of false positives. For example, two classes that have the same simple name cannot be referenced without the full class name (for example, foo.A and bar.A ). It is also possible that the PMD does verify this case, it may be worth a try.
source share