synchronized Collection < Class < ? > > processRemovedListeners ( Collection < ProbeListener > listeners ) { Set < Class < ? > > classesToTransform = new HashSet < Class < ? > > ( ) ; for ( ProbeListener listener : listeners ) { Collection < ProbeImpl > listenerProbes = removeProbesByListener ( listener ) ; for ( ProbeImpl probe : listenerProbes ) { Class < ? > clazz = probe . getSourceClass ( ) ; removeInterestedByClass ( clazz , listener ) ; if ( removeListenerByProbe ( probe , listener ) ) { classesToTransform . add ( clazz ) ; } } } return classesToTransform ; }
Process the recently unregistered listeners and calculate which classes need to be transformed to remove deactivated probes .