Resolves a URL for the underlying class path resource.
@return the resolved URL, or {@code null} if not resolvable
971162
protected URL resolveURL() {
		if (this.clazz != null) {
			return this.clazz.getResource(this.path);
		}
		else if (this.classLoader != null) {
			return this.classLoader.getResource(this.path);
		}
		else {
			return ClassLoader.getSystemResource(this.path);
		}
	}
1146303
@Override
	public Map<String, RamlUriParameter> getResolvedUriParameters() {
		Map<String, RamlUriParameter> resolvedUriParameters = new HashMap<>();

		RamlResource resource = this;
		while (resource != null) {
			resolvedUriParameters = Stream
					.concat(resolvedUriParameters.entrySet().stream(), resource.getUriParameters().entrySet().stream())
					.collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue()));
			resource = resource.getParentResource();
		}

		return resolvedUriParameters;
	}
1293939
@Override
    public String getPath() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getPath();
        return null;
    }
383032
@CheckForNull
    public String getPath() {
        Source parent = getParent();
        if (parent != null)
            return parent.getPath();
        return null;
    }
692828
public static URL getResourceUrl(String resource, Class<?> baseClass) {
		return ResourceUtil.getResource(resource, baseClass);
	}
485570
private URL getUrl() {
		ClassLoader loader = Thread.currentThread().getContextClassLoader();
		URL url = loader.getResource(this.getPath());
		return url;
	}
838365
def resolve_url(self, resource_name):
        """"""

        if self.target_format == 'csv' and self.target_file != DEFAULT_METATAB_FILE:
            # For CSV packages, need to get the package and open it to get the resoruce URL, becuase
            # they are always absolute web URLs and may not be related to the location of the metadata.
            s = self.get_resource()
            rs = s.doc.resource(resource_name)
            return parse_app_url(rs.url)
        else:
            jt = self.join_target(resource_name)
            rs = jt.get_resource()
            t = rs.get_target()
        return t
1221420
@Pure
	public static Iterator<URL> getClasspath() {
		Iterator<URL> iterator = getStartClasspath();

		final ClassLoader loader = ClassLoaderFinder.findClassLoader();
		try {
			final DynamicURLClassLoader dLoader = (DynamicURLClassLoader) loader;
			iterator = new FilteringIterator(Arrays.asList(dLoader.getURLs()).iterator());
		} catch (ClassCastException exception1) {
			if (ClasspathUtil.class.getClassLoader() != loader) {
				try {
					try (URLClassLoader dLoader = (URLClassLoader) loader) {
						iterator = new IteratorIterator(
								new FilteringIterator(Arrays.asList(dLoader.getURLs()).iterator()),
								iterator);
					}
				} catch (ClassCastException | IOException exception2) {
					//
				}
			}
		}

		return iterator;
	}
447801
public URI getResultPath() {
        final String str = _customProperties.get(PROPERTY_RESULT_PATH);
        if (Strings.isNullOrEmpty(str)) {
            return null;
        }
        return URI.create(str);
    }
410851
public String resolve() {
		Timestamp timestamp = RuntimeProvider.createTimestamp();
		StringBuilder builder = new StringBuilder();
		for (Segment segment : segments) {
			builder.append(segment.createToken(builder.toString(), timestamp));
		}
		return builder.toString();
	}
760149
public static Resource resolveUrl(SlingHttpServletRequest request, String url) {
        return request.getResourceResolver().getResource(url);
    }
129483
protected URL getResourceURLOrSystemId() throws Exception {
        URL url = getResourceURL();
        if (url != null) return url;
        return new URL(getResolvedSystemId());
    }
698719
protected function resolvePath()
    {
        if (!isset($this->server['REQUEST_URI'])) {
            return null;
        }

        $url = $this->server['REQUEST_URI'];

        if (false !== $queryStart = strpos($url, '?')) {
            $url = substr($url, 0, $queryStart);
        }

        $url = preg_replace('/^' . preg_quote($this->dir, '/') . '/', null, $url);
        $url = '/' . trim($url, '/');

        return $url;
    }
606917
public final URL getResourceURL(String name) {
		URL url = loadResourceURL(name);
		if (url == null && subLoaders != null)
			for (AbstractClassLoader sub : subLoaders) {
				url = sub.getResourceURL(name);
				if (url != null) break;
			}
		return url;
	}
1115322
public String url() {

    /* build the fully qualified url with all query parameters */
    StringBuilder url = new StringBuilder(this.path());
    if (!this.queries.isEmpty()) {
      url.append(this.queryLine());
    }
    if (fragment != null) {
      url.append(fragment);
    }

    return url.toString();
  }
569302
@Override
	public URL getResourceUrl(String fileName) {
		if (fileName == null) {
			return null;
		}
		URL resource = getClass().getResource(fileName);
		if (resource == null) {
			resource = Thread.currentThread().getContextClassLoader().getResource(fileName);
			if (resource == null) {
				resource = ClassLoader.getSystemResource(fileName);
				if (resource == null) {
					File file = new File(fileName);
					if (file.exists()) {
						try {
							resource = file.toURI().toURL();
						} catch (MalformedURLException e) {
							throw new JKException(e);
						}
					}
				}
			}
		}
		return resource;
	}
441229
public static String getClassPath(Class clazz){
        CodeSource codeSource = clazz.getProtectionDomain().getCodeSource();
        if(codeSource!=null)
            return URLUtil.toSystemID(codeSource.getLocation());
        else{
            URL url = clazz.getResource(clazz.getSimpleName() + ".class");
            if("jar".equals(url.getProtocol())){
                String path = url.getPath();
                try{
                    return URLUtil.toSystemID(new URL(path.substring(0, path.lastIndexOf('!'))));
                }catch(MalformedURLException ex){
                    throw new ImpossibleException("as per JAR URL Syntax this should never happen", ex);
                }
            }
            String resource = URLUtil.toSystemID(url);
            String relativePath = "/"+clazz.getName().replace(".", FileUtil.SEPARATOR)+".class";
            if(resource.endsWith(relativePath))
                resource = resource.substring(0, resource.length()-relativePath.length());
            return resource;
        }
    }