question: public static URL [ ] pathToURLs ( String path ) { StringTokenizer st = new StringTokenizer ( path , File . pathSeparator ) ; URL [ ] urls = new URL [ st . countTokens ( ) ] ; int count = 0 ; while ( st . hasMoreTokens ( ) ) { URL url = fileToURL ( new File ( st . nextToken ( ) ) ) ; if ( url != null ) { urls [ count ++ ] = url ; } } urls = Arrays . copyOf ( urls , count ) ; return urls ; }
target:  Utility method for converting a search path string to an array of directory and JAR file URLs. Note that this method is called by apt and the DocletInvoker.