protected void traverseJar ( File file , TraversalState state ) { JarFile jar ; JarEntry entry ; Enumeration enm ; if ( isLoggingEnabled ( ) ) getLogger ( ) . log ( Level . INFO , "Analyzing jar: " + file ) ; if ( ! file . exists ( ) ) { getLogger ( ) . log ( Level . WARNING , "Jar does not exist: " + file ) ; return ; } try { jar = new JarFile ( file ) ; enm = jar . entries ( ) ; while ( enm . hasMoreElements ( ) ) { entry = ( JarEntry ) enm . nextElement ( ) ; if ( entry . getName ( ) . endsWith ( ".class" ) ) traverse ( entry . getName ( ) , state ) ; } traverseManifest ( jar . getManifest ( ) , state ) ; } catch ( Exception e ) { getLogger ( ) . log ( Level . SEVERE , "Failed to inspect: " + file , e ) ; } }
Fills the class cache with classes from the specified jar .