static private List < LaunchManifest . RequiredBundle > findExtensionBundles ( List < File > dirs ) throws IOException { List < LaunchManifest . RequiredBundle > list = new ArrayList < LaunchManifest . RequiredBundle > ( ) ; for ( File dir : dirs ) { if ( dir . exists ( ) ) { File [ ] files = dir . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { if ( ! file . isDirectory ( ) && file . getName ( ) . toLowerCase ( ) . endsWith ( ".jar" ) ) { String bundles = getRequiredBundles ( file ) ; if ( bundles != null ) { list . addAll ( LaunchManifest . parseRequireBundle ( bundles ) ) ; } } } } } } return list ; }
Find Required bundles from the manifest file underneath specified directory recursively . this method does not expect that the parameters are null . returns list of RequredBundle object .