Check for classes that implement the TypeVisitor interface

Java SE 8 added a new method, visitIntersection , to the javax.lang.model.type.TypeVisitor interface. This rule detects and flags Java classes that implement this interface but do not implement the visitIntersection(IntersectionType t, P p) method. Any class without the visitIntersection method that directly implements this Java interface will not compile.

The TypeVisitor Java documentation cautions against directly implementing this interface because of possible future interface extensions. Instead of directly implementing the interface, extend one of the utility visitors.