public void classAvailable ( Class < ? > clazz ) { if ( ! isMonitorable ( clazz ) ) { return ; } listenersLock . readLock ( ) . lock ( ) ; try { for ( ProbeListener listener : allRegisteredListeners ) { ProbeFilter filter = listener . getProbeFilter ( ) ; if ( filter . matches ( clazz ) ) { addInterestedByClass ( clazz , Collections . singleton ( listener ) ) ; } } } finally { listenersLock . readLock ( ) . unlock ( ) ; } // Update the new class with the configured probes if ( ! getInterestedByClass ( clazz ) . isEmpty ( ) ) { this . transformer . instrumentWithProbes ( Collections . < Class < ? > > singleton ( clazz ) ) ; } }
Process a recently defined class to determine if it needs to be transformed with probes .