This implementation checks for the resolution of a resource URL.

@return if exists.
@see java.lang.ClassLoader#getResource(String)
@see java.lang.Class#getResource(String)
354002
@Override
    public boolean exists() {
        URL url;
        if (this.clazz != null) {
            url = this.clazz.getResource(this.path);
        } else {
            url = this.classLoader.getResource(this.path);
        }
        return (url != null);
    }
734597
public static Uri getUriFromResource(@NonNull Context context, @AnyRes int resId) throws Resources.NotFoundException {
        /** Return a Resources instance for your application's package. */
        Resources res = context.getResources();
        /**
         * Creates a Uri which parses the given encoded URI string.
         * @param uriString an RFC 2396-compliant, encoded URI
         * @throws NullPointerException if uriString is null
         * @return Uri for this given uri string
         */
        /** return uri */
        return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE +
                "://" + res.getResourcePackageName(resId)
                + '/' + res.getResourceTypeName(resId)
                + '/' + res.getResourceEntryName(resId));
    }
1324337
public IResource getResource()
	{
		try
		{
			final IResource resource = ensureMarker().getResource();
			if (!resource.equals(getWorkspaceRoot()))
			{
				return resource;
			}
		} catch (CoreException e)
		{
			VdmDebugPlugin.log(e);
		}
		return null;
	}
713113
@Override
	public Reader getResource(String resourceName) throws ResourceNotFoundException {

		return getResource(null, resourceName, false);
	}
558331
public T get(GVRAndroidResource androidResource) {
        WeakReference<T> reference = cache.get(androidResource);
        if (reference == null) {
            // Not in map
            // Log.d(TAG, "get(%s) returning %s", androidResource, null);
            return null;
        }
        T cached = reference.get();
        if (cached == null) {
            // In map, but not in memory
            cache.remove(androidResource);
        } else {
            // No one will ever read this stream
            androidResource.closeStream();
        }
        // Log.d(TAG, "get(%s) returning %s", androidResource, cached);
        return cached;
    }
820542
public URL findResource(final String name) {

        if (log.isDebugEnabled())
            log.debug("    findResource(" + name + ")");

        URL url = null;

        ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
        if (entry == null) {
            entry = findResourceInternal(name, name);
        }
        if (entry != null) {
            url = entry.source;
        }

        if ((url == null) && hasExternalRepositories)
            url = super.findResource(name);

        if (log.isDebugEnabled()) {
            if (url != null)
                log.debug("    --> Returning '" + url.toString() + "'");
            else
                log.debug("    --> Resource not found, returning null");
        }
        return (url);

    }
413902
@Override
    public Resource getResource(String path) {
	int index = path.indexOf("://");
	if (index != -1) {
	    String scheme = path.substring(0, index).toLowerCase().trim();
	    String subPath = path.substring(index + 3);
	    for (int i = 0; i < resources.length; i++) {
		if (scheme.equalsIgnoreCase(resources[i].getScheme())) {
		    return resources[i].instance().getResource(subPath);
		}
	    }
	}
	return defaultResource.getResource(path);
    }
333964
@Override
    protected URL getURL(String name) {
        return Thread.currentThread().getContextClassLoader().getResource(name);
    }
467250
public static @NotNull Resource getSyntheticLinkResource(@NotNull ResourceResolver resourceResolver, @NotNull String url) {
    Map<String, Object> map = new HashMap<>();
    map.put(LinkNameConstants.PN_LINK_TYPE, ID);
    map.put(LinkNameConstants.PN_LINK_EXTERNAL_REF, url);
    return new SyntheticLinkResource(resourceResolver, map);
  }
1096334
@javax.annotation.Nonnull
  public File getResourceDir() {
    @javax.annotation.Nonnull final File etc = new File(fileName.getParentFile(), "etc");
    etc.mkdirs();
    return etc;
  }
174553
@Override
	public Resource getResource(String key)
	{

		Resource resource = new ClasspathResource(key, this.getChildPath(root, key), this);
		return resource;
	}
959613
public URL getResourceURL(String name) {
		if (name.length() == 0) return null;
		if (name.charAt(0) == '/') name = name.substring(1);
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		URL url = cl.loadResourceURL(name);
    		if (url != null) return url;
    	}
    	// then try on the core one
    	return AppClassLoader.class.getClassLoader().getResource(name);
	}
1349276
public Resource getResource(String name, Locale locale) throws IOException {
        return getResource(name, locale, null);
    }
820804
@Override
    public URL getResource( String path )
    {
        URL url = null;
        if ( baseLoader != null )
            // classloader wants no leading slash
            url = baseLoader.getResource( path.substring(1) );
        if ( url == null )
            url = super.getResource( path );
        return url;
    }
1098115
public Builder getResource(String queryUrl) throws Exception {
    if (debug)
      LOGGER.log(Level.INFO, queryUrl);
    WebResource wrs = client.resource(queryUrl);
    Builder result = wrs.header("USER-AGENT", USER_AGENT);
    return result;
  }
162149
public static Resource getConsoleResource(BeanContext context) {
        SlingHttpServletRequest request = context.getRequest();
        ResourceResolver resolver = request.getResourceResolver();
        String path = null;
        // use the resource set by a probably executed 'defineObjects' tag (supports including components)
        Resource resource = context.getAttribute("resource", Resource.class);
        if (resource == null) {
            resource = request.getResource();
        }
        if (resource != null) {
            path = resource.getPath();
        }
        // use the suffix as the resource path if the resource is not defined or references a servlet
        if (StringUtils.isBlank(path) || path.startsWith("/bin/")) {
            RequestPathInfo requestPathInfo = request.getRequestPathInfo();
            path = requestPathInfo.getSuffix();
            resource = null;
        }
        if (resource == null && StringUtils.isNotBlank(path)) {
            resource = resolver.getResource(path);
        }
        if (resource == null) {
            // fallback to the root node if the servlet request has no suffix
            resource = resolver.getResource("/");
        }
        return resource;
    }
329765
@Override
	public InputStream getResourceAsStream(String resourceName, boolean processingBundle) {

		InputStream is = null;
		if (!resourceName.contains(":") && isAccessPermitted(resourceName)) {
			is = context.getResourceAsStream(resourceName);
		}
		return is;
	}