Reports usages of classes in a field or method signature when a class in a signature is less visible than the member itself. While legal Java, such members are useless outside of the visibility scope.

Example:

In Java 9, a module may hide some of its classes by excluding their packages from export. So, if the signature of exported API contains a non-exported class, such an API is useless outside of the module.

Configure the inspection: