@ Override @ Pure public Enumeration < URL > findResources ( final String name ) throws IOException { final Enumeration < ? > e = this . ucp . findResources ( name , true ) ; return new Enumeration < URL > ( ) { private URL url ; private boolean next ( ) { if ( this . url != null ) { return true ; } do { final URL u = AccessController . doPrivileged ( new PrivilegedAction < URL > ( ) { @ Override public URL run ( ) { if ( ! e . hasMoreElements ( ) ) { return null ; } return ( URL ) e . nextElement ( ) ; } } , DynamicURLClassLoader . this . acc ) ; if ( u == null ) { break ; } this . url = DynamicURLClassLoader . this . ucp . checkURL ( u ) ; } while ( this . url == null ) ; return this . url != null ; } @ Override public URL nextElement ( ) { if ( ! next ( ) ) { throw new NoSuchElementException ( ) ; } final URL u = this . url ; this . url = null ; return u ; } @ Override public boolean hasMoreElements ( ) { return next ( ) ; } } ; }
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name .