@ Override public void sawOpcode ( final int seen ) { try { stack . precomputation ( this ) ; if ( OpcodeUtils . isStandardInvoke ( seen ) ) { String calledClass = getDottedClassConstantOperand ( ) ; if ( seen == Const . INVOKEINTERFACE ) { int parmCount = SignatureUtils . getNumParameters ( this . getSigConstantOperand ( ) ) ; if ( ! countClassAccess ( parmCount ) ) { countClassAccess ( calledClass ) ; } } else { countClassAccess ( calledClass ) ; } } else if ( seen == Const . PUTFIELD ) { countClassAccess ( 1 ) ; } else if ( seen == Const . GETFIELD ) { countClassAccess ( 0 ) ; } else if ( ( seen == Const . PUTSTATIC ) || ( seen == Const . GETSTATIC ) ) { countClassAccess ( getDottedClassConstantOperand ( ) ) ; } else if ( ( seen == Const . ALOAD_0 ) && ( ! methodIsStatic ) ) { countClassAccess ( clsName ) ; } } finally { stack . sawOpcode ( this , seen ) ; } }
overrides the visitor to look for method calls and populate a class access count map based on the owning class of methods called .