ClassPathLoader { private Enumeration<URL> getResources(final Class<?> contextClass, final String name) throws IOException { final LinkedHashSet<URL> urls = new LinkedHashSet<>(); if (contextClass != null) { CollectionUtils.addAll(urls, contextClass.getClassLoader().getResources(name)); } for (ClassLoader classLoader : getClassLoaders()) { Enumeration<URL> resources = classLoader.getResources(name); if (resources != null && resources.hasMoreElements()) { CollectionUtils.addAll(urls, resources); } } return Collections.enumeration(urls); } ClassPathLoader(boolean excludeTCCL);  ClassPathLoader(boolean excludeTCCL, File workingDir); static ClassPathLoader setLatestToDefault(File workingDir); JarDeployer getJarDeployer(); URL getResource(final String name); Class<?> forName(final String name); @Override String toString(); URL getResource(final Class<?> contextClass, final String name); InputStream getResourceAsStream(final String name); InputStream getResourceAsStream(final Class<?> contextClass, final String name); Enumeration<URL> getResources(final String name); ClassLoader asClassLoader(); static ClassPathLoader getLatest(); static ClassLoader getLatestAsClassLoader();  }
@Test public void testGetResources() throws Exception { System.out.println("\nStarting ClassPathLoaderTest#testGetResources"); String resourceToGet = "org/apache/geode/internal/classpathloaderjunittest/DoesExist.class"; Enumeration<URL> urls = ClassPathLoader.getLatest().getResources(resourceToGet); assertThat(urls).isNotNull(); assertThat(urls.hasMoreElements()).isTrue(); URL url = urls.nextElement(); InputStream is = url != null ? url.openStream() : null; assertThat(is).isNotNull(); int totalBytesRead = 0; byte[] input = new byte[256]; BufferedInputStream bis = new BufferedInputStream(is); for (int bytesRead = bis.read(input); bytesRead > -1;) { totalBytesRead += bytesRead; bytesRead = bis.read(input); } bis.close(); assertThat(totalBytesRead).isEqualTo(GENERATED_CLASS_BYTES_COUNT); }