public boolean scanJar ( String jarname ) { try ( JarFile jf = new JarFile ( jarname ) ) { out . println ( Messages . get ( "scan.head.jar" , jarname ) ) ; finder . addJar ( jarname ) ; Enumeration < JarEntry > entries = jf . entries ( ) ; while ( entries . hasMoreElements ( ) ) { JarEntry entry = entries . nextElement ( ) ; String name = entry . getName ( ) ; if ( name . endsWith ( ".class" ) && ! name . endsWith ( "package-info.class" ) && ! name . endsWith ( "module-info.class" ) ) { processClass ( ClassFile . read ( jf . getInputStream ( entry ) ) ) ; } } return true ; } catch ( NoSuchFileException nsfe ) { errorNoFile ( jarname ) ; } catch ( IOException | ConstantPoolException ex ) { errorException ( ex ) ; } return false ; }
Scans a jar file for uses of deprecated APIs .