/** * Find a list of resources matching a given path on the classpath. for all * elements of java.class.path get a Collection of resources Pattern pattern * = Pattern.compile(".*"); gets all resources * * @return the resources in the order they are found */ public Collection<String> list() { final ArrayList<String> resources = new ArrayList<>(); resources.addAll(systemPropertiesClasspathElements()); ClassLoader classLoader = getClass().getClassLoader(); if (classLoader instanceof URLClassLoader) { addResourcesFromUrlClassLoader(resources, (URLClassLoader) classLoader); } return resources; }
/** * Find a list of resources matching a given path on the classpath. for all * elements of java.class.path get a Collection of resources Pattern pattern * = Pattern.compile(".*"); gets all resources * * @return the resources in the order they are found */ public Collection<String> list() { final ArrayList<String> resources = new ArrayList<String>(); resources.addAll(systemPropertiesClasspathElements()); ClassLoader classLoader = getClass().getClassLoader(); if (classLoader instanceof URLClassLoader) { addResourcesFromUrlClassLoader(resources, (URLClassLoader) classLoader); } return resources; }
/** * Find a list of resources matching a given path on the classpath. for all * elements of java.class.path get a Collection of resources Pattern pattern * = Pattern.compile(".*"); gets all resources * * @return the resources in the order they are found */ public Collection<String> list() { final ArrayList<String> resources = new ArrayList<String>(); resources.addAll(systemPropertiesClasspathElements()); ClassLoader classLoader = getClass().getClassLoader(); if (classLoader instanceof URLClassLoader) { addResourcesFromUrlClassLoader(resources, (URLClassLoader) classLoader); } return resources; }