@ Override public void visitClassContext ( ClassContext classContext ) { JavaClass cls = classContext . getJavaClass ( ) ; if ( cls . isClass ( ) && ( cls . getMajor ( ) >= JDK15_MAJOR ) ) { Map < String , Set < String > > methodInfo = new HashMap <> ( ) ; populateMethodInfo ( cls , methodInfo ) ; Method [ ] methods = cls . getMethods ( ) ; for ( Method m : methods ) { String name = m . getName ( ) ; String signature = m . getSignature ( ) ; Set < String > sigs = methodInfo . get ( name ) ; if ( sigs != null ) { for ( String sig : sigs ) { if ( confusingSignatures ( sig , signature ) ) { bugReporter . reportBug ( new BugInstance ( this , BugType . CAO_CONFUSING_AUTOBOXED_OVERLOADING . name ( ) , NORMAL_PRIORITY ) . addClass ( cls . getClassName ( ) ) . addString ( name + signature ) . addString ( name + sig ) ) ; } } } } } }
overrides the visitor to look for confusing signatures