@ Override public void visitMethod ( Method obj ) { if ( ! obj . isAbstract ( ) ) return ; String methodName = obj . getName ( ) ; String methodSig = obj . getSignature ( ) ; outer : for ( JavaClass cls : superClasses ) { Method [ ] methods = cls . getMethods ( ) ; for ( Method m : methods ) { if ( m . isPrivate ( ) || m . isAbstract ( ) ) continue ; if ( methodName . equals ( m . getName ( ) ) && methodSig . equals ( m . getSignature ( ) ) ) { BugInstance bug = new BugInstance ( this , BugType . AOM_ABSTRACT_OVERRIDDEN_METHOD . name ( ) , NORMAL_PRIORITY ) . addClass ( this ) . addMethod ( this ) ; Code code = obj . getCode ( ) ; if ( code != null ) bug . addSourceLineRange ( clsContext , this , 0 , code . getLength ( ) - 1 ) ; bugReporter . reportBug ( bug ) ; break outer ; } } } }
overrides the visitor to find abstract methods that override concrete ones