@ Override public void visitCode ( Code obj ) { try { String signature = SignatureUtils . getReturnSignature ( getMethod ( ) . getSignature ( ) ) ; if ( signature . startsWith ( Values . SIG_QUALIFIED_CLASS_PREFIX ) && CollectionUtils . isListSetMap ( SignatureUtils . stripSignature ( signature ) ) ) { stack . resetForMethodEntry ( this ) ; imType = ImmutabilityType . UNKNOWN ; super . visitCode ( obj ) ; if ( ( imType == ImmutabilityType . IMMUTABLE ) || ( imType == ImmutabilityType . POSSIBLY_IMMUTABLE ) ) { Method m = getMethod ( ) ; Statistics . getStatistics ( ) . addImmutabilityStatus ( clsName , m . getName ( ) , m . getSignature ( ) , imType ) ; } } } catch ( ClassNotFoundException cnfe ) { bugReporter . reportMissingClass ( cnfe ) ; } }
overrides the visitor to reset the stack for the new method then checks if the immutability field is set to immutable and if so reports it