Returns the complete path with the classpath prefix

@param resourcePath
the resource path
@return the complete path with the classpath prefix
774921
private String getCompletePath(String resourcePath) {
		String path = PathNormalizer.normalizePath(classpathPrefix + resourcePath);
		return path;
	}
812661
public static String resourceName(URI uri) {
        if (!CLASSPATH_SCHEME.equals(uri.getScheme())) {
            throw new IllegalArgumentException("uri must have classpath scheme " + uri);
        }

        String resourceName = uri.getSchemeSpecificPart();
        if (resourceName.startsWith("/")) {
            return resourceName.substring(1);
        }
        return resourceName;
    }
269878
private static String getPath(final Object classpath) {
        final Object container = ReflectionUtils.getFieldVal(classpath, "container", false);
        if (container == null) {
            return "";
        }

        final Object delegate = ReflectionUtils.getFieldVal(container, "delegate", false);
        if (delegate == null) {
            return "";
        }

        final String path = (String) ReflectionUtils.getFieldVal(delegate, "path", false);
        if (path != null && path.length() > 0) {
            return path;
        }

        final Object base = ReflectionUtils.getFieldVal(delegate, "base", false);
        if (base == null) {
            // giving up.
            return "";
        }

        final Object archiveFile = ReflectionUtils.getFieldVal(base, "archiveFile", false);
        if (archiveFile != null) {
            final File file = (File) archiveFile;
            return file.getAbsolutePath();
        }
        return "";
    }
989737
public Set<String> getResourcePaths(String path) {

		Set<String> result = new HashSet<String>();
		path = path.replace('/', File.separatorChar);
		File resource = new File(baseDir, path);

		// If the path is not valid throw an exception
		String[] resArray = resource.list();
		if (null == resArray)
			return result;

		// Make the returned dirs end with '/', to match a servletcontext
		// behavior.
		for (int i = 0; i < resArray.length; i++) {

			resArray[i] = path + resArray[i];
			if (isDirectory(resArray[i]))
				resArray[i] += '/';
		}
		result.addAll(Arrays.asList(resArray));

		return result;
	}
633023
public static <T> T withFilePathOrClasspath(
            String resourceFilePathOrClasspath,
            TypeReference<T> typeReference) {
        return withJsonString(JMResources
                        .getStringWithFilePathOrClasspath(resourceFilePathOrClasspath),
                typeReference);
    }
199303
public static Properties getProperties(String classpath) {
        Properties properties = new Properties();
        try (InputStream is = getResourceInputStream(classpath)) {
            properties.load(is);
            return properties;
        } catch (Exception e) {
            return JMExceptionManager.handleExceptionAndReturnNull(log, e,
                    "getProperties", classpath);
        }
    }
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;
    }
1284909
public int submitFilePathOrClasspath(
            String filePathOrResourceClasspath) {
        return submitStream(JMOptional
                .getOptional(JMFiles.readLines(filePathOrResourceClasspath))
                .orElseGet(() -> JMResources
                        .readLines(filePathOrResourceClasspath)).stream());
    }
642604
public static URL getURL(String classpathOrFilePath) {
        try {
            return getURI(classpathOrFilePath).toURL();
        } catch (MalformedURLException e) {
            return JMExceptionManager.handleExceptionAndReturnNull(log, e,
                    "getURL", classpathOrFilePath);
        }
    }
1021381
public static String getClassPath()
  {
    if (_classPath != null)
      return _classPath;

    String cp = System.getProperty("java.class.path");

    String boot = System.getProperty("sun.boot.class.path");
    if (boot != null && ! boot.equals(""))
      cp = cp + File.pathSeparatorChar + boot;

    Pattern pattern = Pattern.compile("" + File.pathSeparatorChar);

    String []path = pattern.split(cp);

    CharBuffer cb = new CharBuffer();

    for (int i = 0; i < path.length; i++) {
      PathImpl subpath = VfsOld.lookup(path[i]);

      if (subpath.canRead() || subpath.isDirectory()) {
        if (cb.length() > 0)
          cb.append(File.pathSeparatorChar);

        cb.append(path[i]);
      }
    }

    _classPath = cb.toString();

    return _classPath;
  }
569230
public static ArchivePath getPathForClassloaderResource(String resourceName) {
        String extractedPath = null;
        if (resourceName.lastIndexOf('/') != -1) {
            extractedPath = resourceName.substring(0, resourceName.lastIndexOf('/'));
        }
        return new BasicPath(extractedPath);
    }
853476
public ResourceHandle getParent(String resourceType, String path) {
        ResourceResolver resolver = getResolver();
        Resource resource;
        while (((resource = resolver.getResource(path)) == null || !resource.isResourceType(resourceType))
                && StringUtils.isNotBlank(path)) {
            int delimiter = path.lastIndexOf('/');
            if (delimiter >= 0) {
                path = path.substring(0, delimiter);
            } else {
                break;
            }
        }
        return ResourceHandle.use(resource);
    }
546642
public static Optional<String> getStringAsOptWithClasspath(
            String classpath, String charsetName) {
        return getResourceInputStreamAsOpt(classpath)
                .map(resourceInputStream -> JMInputStream
                        .toString(resourceInputStream, charsetName));
    }
143293
public static File getFileForResource(final String resourcePath) {
        URL path = ResourceUtil.class.getResource(resourcePath);
        if (path == null) {
            path = ResourceUtil.class.getResource("/");
            return new File(new File(path.getPath()), resourcePath);
        }

        return new File(path.getPath());
    }
1173255
public static String getHost(String resourcePath) {
        String hostSpec;
        if (resourcePath.contains(":")) {
            hostSpec = resourcePath.split(":")[0];
        } else {
            hostSpec = resourcePath;
        }

        if (hostSpec.contains("/")) {
            hostSpec = hostSpec.substring(0, hostSpec.indexOf('/'));
        }

        return hostSpec;
    }
801783
private ResourcePaths.ResourcePath getPathInternal() {
        String resolvedPath;
        if (isPathAnnotationPresent()) {
            Path path = this.annotations.get(Path.class);
            if (isBlank(path.value())) {
                throw new IllegalArgumentException("The value of the @" + Path.class.getSimpleName() +
                        " annotation on " + field + " must not be empty");
            }
            resolvedPath = path.value();
        } else {
            resolvedPath = field.getName();
        }
        return path(resolvedPath);
    }
1271200
private String makeUrlPath(String servicePath) {
		if (null == servicePath || 0 == servicePath.length()) {
			throw new IllegalArgumentException("the service path must be provided");
		}
		
		if ('/' == servicePath.charAt(0)) {
			return servicePath;
		}
		
		return PATH_PREFIX.concat(servicePath);
	}