Builds a mapping of class paths to URLs.
345967
def build_urls(self: NodeVisitor, node: inheritance_diagram) -> Mapping[str, str]:
    
    current_filename = self.builder.current_docname + self.builder.out_suffix
    urls = {}
    for child in node:
        # Another document
        if child.get("refuri") is not None:
            uri = child.get("refuri")
            package_path = child["reftitle"]
            if uri.startswith("http"):
                _, _, package_path = uri.partition("#")
            else:
                uri = (
                    pathlib.Path("..")
                    / pathlib.Path(current_filename).parent
                    / pathlib.Path(uri)
                )
                uri = str(uri).replace(os.path.sep, "/")
            urls[package_path] = uri
        # Same document
        elif child.get("refid") is not None:
            urls[child["reftitle"]] = (
                "../" + current_filename + "#" + child.get("refid")
            )
    return urls
312149
private static Map<String, Integer> findClasses(Path path)
    {
        List<String> paths = findPaths(path, true);
        Map<String, Integer> results = new HashMap<>();
        for (String subPath : paths)
        {
            if (subPath.endsWith(".java") || subPath.endsWith(".class"))
            {
                String qualifiedName = PathUtil.classFilePathToClassname(subPath);
                addClassToMap(results, qualifiedName);
            }
        }
        return results;
    }
1158911
private List<String> buildUrls(List<String> references) {
		List<String> urls = new ArrayList<String>(references.size());
		for (String url : references) {
			if (url.toUpperCase().startsWith("RFC")) {
				url = RFC_REFERENCE_BASE_URL + url;
			} else if (url.startsWith("http")) {
				// already an URL so do nothing
			} else {
				url = MIME_TYPE_REFERENCE_BASE_URL + "#" + url;
			}
			urls.add(url);
		}
		return urls;
	}
1238170
def urls(cls):
        
        class_name = cls.get_class_name()
        if django.VERSION >= (2, 0):
            return path('{}/'.format(class_name), include([
                path('popup/', cls.create().as_view(), name='{}_popup_create'.format(class_name)),
                path('popup/<int:pk>/', cls.update().as_view(), name='{}_popup_update'.format(class_name)),
                path('popup/delete/<int:pk>/', cls.delete().as_view(), name='{}_popup_delete'.format(class_name)),
            ]))
        else:
            return url(r'^{}/'.format(class_name), include([
                url(r'^popup/$', cls.create().as_view(), name='{}_popup_create'.format(class_name)),
                url(r'^popup/(?P<pk>\d+)/$', cls.update().as_view(), name='{}_popup_update'.format(class_name)),
                url(r'^popup/delete/(?P<pk>\d+)/$', cls.delete().as_view(), name='{}_popup_delete'.format(class_name)),
            ]))
1204183
public void buildResourcePaths() {
        try {
            if (Boolean.getBoolean(Stapler.class.getName()+".noResourcePathCache")) {
                resourcePaths = null;
                return;
            }

            Map<String,URL> paths = new HashMap<String,URL>();
            Stack<String> q = new Stack<String>();
            q.push("/");
            while (!q.isEmpty()) {
                String dir = q.pop();
                Set<String> children = context.getResourcePaths(dir);
                if (children!=null) {
                    for (String child : children) {
                        if (child.endsWith("/"))
                            q.push(child);
                        else {
                            URL v = context.getResource(child);
                            if (v==null) {
                                resourcePaths = null;
                                return; // this can't happen. abort with no cache
                            }
                            paths.put(child, v);
                        }
                    }
                }
            }

            resourcePaths = Collections.unmodifiableMap(paths);
        } catch (MalformedURLException e) {
            resourcePaths = null; // abort
        }
    }
834150
public static URL[] findClassPaths()
   {
      List<URL> list = new ArrayList<URL>();
      String classpath = System.getProperty("java.class.path");
      StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);

      while (tokenizer.hasMoreTokens())
      {
         String path = tokenizer.nextToken();
         File fp = new File(path);
         if (!fp.exists()) {
        	 throw new RuntimeException("File in java.class.path does not exist: " + fp);
         }
         try
         {
            list.add(fp.toURL());
         }
         catch (MalformedURLException e)
         {
            throw new RuntimeException(e);
         }
      }
      return list.toArray(new URL[list.size()]);
   }
876121
def paths_from_buildroot_iter(self):
    """"""
    for f in self:
      yield os.path.join(self.rel_root, f)
922052
def get_paths(self, key):
        ""
        result_list = []
        if key in self.keys():
            result_list.append(((key,), self[key]))
        for sub_key, v in self.items():
            if isinstance(v, self.__class__):
                sub_res_list = v.get_paths(key)
                for key_path, res in sub_res_list:
                    result_list.append(((sub_key,) + key_path, res))
            elif isinstance(v, dict):
                if key in v.keys():
                    result_list.append(((sub_key, key), v[key]))
        return result_list
555723
def map(self, options=None):
        """"""
        for path, data in self.paths.items():
            for obj in self.create_class(data, options=options):
                self.add_object(obj)
399620
def new_path(model_class, url_params: {})
      url_for url_params.to_h.reverse_merge(
        resources: to_resources_name(model_class),
        action: :new
      )
    end
99868
def build_url(self, *args, **kwargs):
        """"""
        parts = [kwargs.get('base_url') or self.base_url]
        parts.extend(args)
        parts = [str(p) for p in parts]
        key = tuple(parts)
        __logs__.info('Building a url from %s', key)
        if not key in __url_cache__:
            __logs__.info('Missed the cache building the url')
            __url_cache__[key] = '/'.join(parts)
        return __url_cache__[key]
93768
protected function buildPaths ()
		{
			$titles = [];
			$guids = [];

			$n = count($this->_data);
			for ($i = 0; $i < $n; $i++)
			{
				$parent = $this->_data[ $i ];
				for ($j = $i + 1; $j < $n; $j++)
				{
					$child = $this->_data[ $j ];
					if ($child->lft > $parent->lft and $child->rgt < $parent->rgt)
					{
						$titles[ $child->id ][] = $parent->title;
						$guids[ $child->id ][] = $parent->guid;
					}
				}
				$titles[ $parent->id ][] = $parent->title;
				$guids[ $parent->id ][] = $parent->guid;

				$parent->titlePath = implode($this->_titlePathDelimiter, $titles[ $parent->id ]);
				$parent->guidPath = implode($this->_guidPathDelimiter, $guids[ $parent->id ]);
			}
		}
360957
private Map<String, Set<String>> scanForAnnotatedClasses(Set<URL> urls) throws IOException {
        AnnotationDB db = new AnnotationDB();
        db.setScanClassAnnotations(true);
        db.setScanFieldAnnotations(false);
        db.setScanMethodAnnotations(false);
        db.setScanParameterAnnotations(false);
      
        db.scanArchives(urls.toArray(new URL[urls.size()]));
        return db.getAnnotationIndex();
        
    }
575361
def url_to_path(self, url):
        
        parts = urlsplit(url)
        try:
            loader, args = self.url_map.bind(parts.netloc).match(parts.path)
            path = args.get('path')
            if loader == 'schema' and path in self.schemas:
                return path
        except HTTPException:
            return None
707387
def url_paths(self):
        
        unformatted_paths = self._url_module.url_paths

        paths = {}
        for unformatted_path, handler in unformatted_paths.items():
            path = unformatted_path.format("")
            paths[path] = handler

        return paths
76191
protected URL[] getCompileClasspathElementURLs() throws DependencyResolutionRequiredException {
    // build class loader to get classes to generate resources for
    return project.getCompileClasspathElements().stream()
        .map(path -> {
          try {
            return new File(path).toURI().toURL();
          }
          catch (MalformedURLException ex) {
            throw new RuntimeException(ex);
          }
        })
        .toArray(size -> new URL[size]);
  }
35116
def _BuildUrl(self, url, path_elements=None, extra_params=None):
        
        # Break url into constituent parts
        (scheme, netloc, path, params, query, fragment) = urlparse(url)

        # Add any additional path elements to the path
        if path_elements:
            # Filter out the path elements that have a value of None
            p = [i for i in path_elements if i]
            if not path.endswith('/'):
                path += '/'
            path += '/'.join(p)

        # Add any additional query parameters to the query string
        if extra_params and len(extra_params) > 0:
            extra_query = self._EncodeParameters(extra_params)
            # Add it to the existing query
            if query:
                query += '&' + extra_query
            else:
                query = extra_query

        # Return the rebuilt URL
        return urlunparse((scheme, netloc, path, params, query, fragment))