Gets classpath resources.

@return A list of all resources on the classpath
177056
public static List<Resource> getClasspathResources() {
      synchronized (classpathResources) {
         if (classpathResources.isEmpty()) {
            for (String jar : SystemInfo.JAVA_CLASS_PATH.split(SystemInfo.PATH_SEPARATOR)) {
               File file = new File(jar);
               if (file.isDirectory()) {
                  classpathResources.addAll(new FileResource(file).getChildren(true));
               } else {
                  classpathResources.addAll(getJarContents(Resources.fromFile(jar), v -> true));
               }
            }
         }
         return Collections.unmodifiableList(classpathResources);
      }
   }
712302
public ResourceFileList getResourceFileList() throws IOException {
		if(root == null) {
			throw new IOException("No prefix set");
		}
		ResourceFileList list = new ResourceFileList();
		populateFileList(list,root,recurse);
		return list;
	}
678018
protected String[] getClassPath() {
        //workaround for Groovy-835
        URL[] urls = getURLs();
        String[] ret = new String[urls.length];
        for (int i = 0; i < ret.length; i++) {
            ret[i] = urls[i].getFile();
        }
        return ret;
    }
904922
public List getResources() {

        if ((m_resources == null) || m_resources.isEmpty()) {
            m_resources = new ArrayList();
            m_resources.add("/");
        }
        return m_resources;
    }
315170
public static List<Path> getFileStorePathList() {
		return getFileStoreList().stream().map(Object::toString)
				.map(toString -> toString.substring(0,
						toString.indexOf(JMString.SPACE)))
				.map(JMPath::getPath).collect(toList());
	}
944840
@Pure
	public List<File> getBootClassPath() {
		if (this.bootClasspath == null) {
			return Collections.emptyList();
		}
		return Collections.unmodifiableList(this.bootClasspath);
	}
114291
private List<URL> getResources() throws IOException {
        final ClassLoader cl = getClassLoader();

        // ConcurrentHashMap doesn't support null keys, so substitute a pseudo
        // key
        final Object key = cl == null ? NULL_CLASS_LOADER : cl;

        // computeIfAbsent requires unchecked exceptions for the creation
        // process, so we
        // cannot easily use it directly, instead using get and putIfAbsent
        List<URL> newValue = cachedResourceList.get(key);
        if (newValue != null) {
            return newValue;
        }

        if (cl != null) {
            newValue = Collections
                    .unmodifiableList(Collections.list(cl.getResources(JARCACHE_JSON)));
        } else {
            newValue = Collections.unmodifiableList(
                    Collections.list(ClassLoader.getSystemResources(JARCACHE_JSON)));
        }

        final List<URL> oldValue = cachedResourceList.putIfAbsent(key, newValue);
        // We are not synchronising access to the ConcurrentMap, so if there
        // were
        // multiple classpath scans, we always choose the first one
        return oldValue != null ? oldValue : newValue;
    }
768693
public String getClassPath() {
        StringBuilder buf = new StringBuilder();
        for (Entry entry : entryList) {
            if (buf.length() > 0) {
                buf.append(File.pathSeparator);
            }
            buf.append(entry.getURL());
        }
        return buf.toString();
    }
518374
public static List<String> getResourcesList(String path) {
    Set<String> resList = new HashSet<>(); // subdirectories can cause duplicate entries
    try {
      // Java doesn't allow simple exploration of resources as directories
      // when the resources are inside a jar file. This searches the contents
      // of the jar to get the list
      URL classUrl = JarHash.class.getResource("/water/H2O.class");
      if (classUrl != null && classUrl.getProtocol().equals("jar")) {
        // extract jarPath from classUrl string
        String jarPath = classUrl.getPath().substring(5, classUrl.getPath().indexOf("!"));
        JarFile jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8"));
        Enumeration<JarEntry> files = jar.entries();
        // look for all entries within the supplied resource path
        while (files.hasMoreElements()) {
          String fName = files.nextElement().getName();
          if (fName.startsWith(path + "/")) {
            String resourceName = fName.substring((path + "/").length());
            int checkSubdir = resourceName.indexOf("/");
            if (checkSubdir >= 0) // subdir, trim to subdir name
              resourceName = resourceName.substring(0, checkSubdir);
            if (resourceName.length() > 0) resList.add(resourceName);
          }
        }
      } else { // not a jar, retrieve resource from file system
        String resourceName;
        BufferedReader resources = new BufferedReader(new InputStreamReader(JarHash.class.getResourceAsStream("/gaid")));
        if (resources != null) {
          while ((resourceName = resources.readLine()) != null)
            if (resourceName.length() > 0)
              resList.add(resourceName);
        }
      }
    }catch(Exception ignore){
      Log.debug("Failed in reading gaid resources.");
    }
    return new ArrayList<>(resList);
  }
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;
	}
869318
static String getClasspathClassFileNames() {
        String classpath = System.getProperty("java.class.path");
        String[] pathParts = classpath.split(File.pathSeparator);

        Set<String> classes = new TreeSet<String>();

        for (String part : pathParts) {
            processPathPart(part, classes);
        }

        StringBuilder sb = new StringBuilder();
        for (String className : classes) {
            sb.append(className).append('\n');
        }

        return sb.toString();
    }
1084869
public List<String> getPropertyPaths() {
        List<String> result = new ArrayList<String>();

        for (String property : this.values.names()) {
            if (!property.startsWith("$")) {
                result.add(this.propertyToPath(property));
            }
        }

        return result;
    }
331035
public static Enumeration<URL> getResources(String resourcePath, Object source) {

		// Try the current classloader
		Enumeration<URL> urls = null;

		ClassLoader cl = source.getClass().getClassLoader();
		try {
			if (null != cl) {
				urls = cl.getResources(resourcePath);
			}

			// If current classloader failed, try with the Threads context
			// classloader. If that fails ott, the resource is either not on the
			// classpath or inaccessible from the current context.

			if (null == urls) {
				urls = Thread.currentThread().getContextClassLoader().getResources(resourcePath);
			}

			// Last chance, hack in the classloader
			if (null == urls) {
				ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
				try {
					Thread.currentThread().setContextClassLoader(source.getClass().getClassLoader());
					if (Thread.currentThread().getContextClassLoader() != null) {

						urls = Thread.currentThread().getContextClassLoader().getResources(resourcePath);
					}
				} finally {
					Thread.currentThread().setContextClassLoader(threadClassLoader);
				}
			}
		} catch (IOException e) {
			LOGGER.warn("Unable to load " + resourcePath, e);
		}

		return urls;
	}
251537
public static Set<String> getClassPaths(String packageName, boolean isDecode) {
		String packagePath = packageName.replace(StrUtil.DOT, StrUtil.SLASH);
		Enumeration<URL> resources;
		try {
			resources = getClassLoader().getResources(packagePath);
		} catch (IOException e) {
			throw new UtilException(e, "Loading classPath [{}] error!", packagePath);
		}
		final Set<String> paths = new HashSet<String>();
		String path;
		while (resources.hasMoreElements()) {
			path = resources.nextElement().getPath();
			paths.add(isDecode ? URLUtil.decode(path, CharsetUtil.systemCharsetName()) : path);
		}
		return paths;
	}
106317
public Collection<Path> getInputPaths()
    {
        Collection<Path> inputPaths = getOptionValue(InputPathOption.NAME);
        return inputPaths;
    }
1299891
protected String getClasspath() throws IOException {
        List<String> classpath = new ArrayList<>();
        classpath.add(getBundleJarPath());
        classpath.addAll(getPluginsPath());
        return StringUtils.toString(classpath.toArray(new String[classpath.size()]), " ");
    }
613009
private List<CmsResource> getResources() {

        List<CmsResource> result = new LinkedList<CmsResource>();
        CmsObject cms = getCms();
        CmsResourceFilter filter = CmsResourceFilter.ALL;
        try {
            for (String path : m_paths) {
                List<CmsResource> resources = cms.readResources(path, filter, true);
                result.addAll(resources);
            }
        } catch (CmsException e) {
            if (LOG.isErrorEnabled()) {
                LOG.error(Messages.get().getBundle().key(Messages.LOG_ERR_PROPERTYVIEWER_READRESOURCES_0), e);
            }
            result = Collections.emptyList();
        }
        return result;
    }