@ Override protected synchronized void includeBaseLocation ( String baseLocation ) { _locations . add ( baseLocation ) ; // only do the processing if the cache has been read. if ( _cacheRead ) { File [ ] files = new File ( _installDir , baseLocation ) . listFiles ( new FileFilter ( ) { @ Override public boolean accept ( File arg0 ) { // select files only if they end .jar and they aren't in the cache already. return arg0 . getName ( ) . endsWith ( ".jar" ) && ! ! ! _bundleLocations . contains ( arg0 ) ; } } ) ; if ( files != null ) { for ( File f : files ) { BundleInfo bInfo ; try { bInfo = new BundleInfo ( f , baseLocation ) ; if ( bInfo . symbolicName != null ) { _dirty = true ; addToCache ( bInfo ) ; } } catch ( IOException e ) { } } } } }
This method scans the provided location under the install dir . It looks at all the jar files in that directory and provided the file isn t in the cache it ll read the manifest and add it into memory .