private void scan ( ) { if ( ivScanned ) { return ; } ivScanned = true ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; for ( Class < ? > klass = ivClass ; klass != null && klass != Object . class ; klass = klass . getSuperclass ( ) ) { if ( isTraceOn && ( tc . isDebugEnabled ( ) || tcMetaData . isDebugEnabled ( ) ) ) Tr . debug ( tc . isDebugEnabled ( ) ? tc : tcMetaData , "scanning " + klass . getName ( ) ) ; ivCurrentClassName = klass . getName ( ) ; ivCurrentPrivateMethodMetaData = null ; ClassLoader classLoader = klass . getClassLoader ( ) ; if ( classLoader == null ) { classLoader = getBootClassLoader ( ) ; // d742751 } String resourceName = klass . getName ( ) . replace ( ' ' , ' ' ) + ".class" ; InputStream input = classLoader . getResourceAsStream ( resourceName ) ; if ( input == null ) // d728537 { if ( isTraceOn && ( tc . isDebugEnabled ( ) || tcMetaData . isDebugEnabled ( ) ) ) Tr . debug ( tc . isDebugEnabled ( ) ? tc : tcMetaData , "failed to find " + resourceName + " from " + classLoader ) ; ivScanException = new FileNotFoundException ( resourceName ) ; return ; } try { ClassReader classReader = new ClassReader ( input ) ; classReader . accept ( this , ClassReader . SKIP_DEBUG | ClassReader . SKIP_FRAMES ) ; } // If the class is malformed, ASM might throw any exception. d728537 catch ( Throwable t ) { FFDCFilter . processException ( t , CLASS_NAME + ".scan" , "168" , this , new Object [ ] { resourceName , klass , classLoader } ) ; if ( isTraceOn && ( tc . isDebugEnabled ( ) || tcMetaData . isDebugEnabled ( ) ) ) Tr . debug ( tc . isDebugEnabled ( ) ? tc : tcMetaData , "scan exception" , t ) ; ivScanException = t ; return ; } finally { try { input . close ( ) ; } catch ( IOException ex ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "error closing input stream" , ex ) ; } } } }
Scan the bytecode of all classes in the hierarchy unless already done .