private void removeUselessDefiners ( final int reg ) { Map < JavaClass , List < MethodInfo > > definers = parameterDefiners . get ( Integer . valueOf ( reg ) ) ; if ( CollectionUtils . isEmpty ( definers ) ) { return ; } String methodSig = getSigConstantOperand ( ) ; String methodName = getNameConstantOperand ( ) ; MethodInfo methodInfo = new MethodInfo ( methodName , methodSig ) ; Iterator < List < MethodInfo > > it = definers . values ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { boolean methodDefined = false ; List < MethodInfo > methodSigs = it . next ( ) ; for ( MethodInfo mi : methodSigs ) { if ( methodInfo . equals ( mi ) ) { methodDefined = true ; String [ ] exceptions = mi . getMethodExceptions ( ) ; if ( exceptions != null ) { for ( String ex : exceptions ) { if ( ! isExceptionHandled ( ex ) ) { methodDefined = false ; break ; } } } break ; } } if ( ! methodDefined ) { it . remove ( ) ; } } if ( definers . isEmpty ( ) ) { parameterDefiners . remove ( Integer . valueOf ( reg ) ) ; } }
parses through the interface that may define a parameter defined by reg and look to see if we can rule it out because a method is called on the object that can t be satisfied by the interface if so remove that candidate interface .