public final class ResourceLoader extends Object
Modifier and Type | Method and Description |
---|---|
static Set<String> |
getAllJarResourceNames(String pathToUse,
Pattern p,
boolean searchSubDirectories,
String jarPath)
Given a Jar, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<String> |
getAllJarResourceNames(String pathToUse,
Pattern p,
boolean searchSubDirectories,
URL jarUrl)
Given a Jar from the classpath, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<String> |
getAllJarResourceNames(String pathToUse,
String regex,
boolean searchSubDirectories,
String jarPath)
Given a Jar, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<String> |
getAllJarResourceNames(String pathToUse,
String regex,
boolean searchSubDirectories,
URL jarUrl)
Given a Jar from the classpath, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<Resource> |
getAllJarResources(String pathToUse,
Pattern p,
boolean searchSubDirectories,
String jarPath)
Given a Jar from the classpath, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<Resource> |
getAllJarResources(String pathToUse,
Pattern p,
boolean searchSubDirectories,
URL jarUrl)
Given a Jar from the classpath, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<Resource> |
getAllJarResources(String pathToUse,
String regex,
boolean searchSubDirectories,
String jarPath)
Given a Jar from the classpath, parses all entries to retrieve those which correspond to provided criteria.
|
static Set<Resource> |
getAllJarResources(String pathToUse,
String regex,
boolean searchSubDirectories,
URL jarUrl)
Given a Jar from the classpath, parses all entries to retrieve those which correspond to provided criteria.
|
static Collection<String> |
getAllJrtResourceNames(String regex,
boolean searchSubDirectories,
String firstJrtElement,
String... moreJrtElements)
Given JRT elements, parses all entries to retrieve those which correspond to provided criteria.
|
static ClassLoader |
getClassLoader()
Retrieves ClassLoader for caller
|
static Collection<URI> |
getClassPath() |
static Collection<String> |
getMatchingResourceNames(String packageName,
String regex)
Returns only resource names without URL.
|
static Collection<String> |
getMatchingResourceNames(String packageName,
String regex,
boolean searchSubDirectories)
Returns only resource names without URL.
|
static Collection<String> |
getMatchingResourceNames(String packageName,
String regex,
boolean searchSubDirectories,
ClassLoader loader)
Returns only resource names without URL.
|
static Collection<String> |
getMatchingResourceNames(String packageName,
String regex,
ClassLoader loader)
Returns only resource names without URL.
|
static Collection<Resource> |
getMatchingResources(String packageName,
String regex)
Parses all classpath resources to locate ones in the provided path which names match the provided
regex.
|
static Collection<Resource> |
getMatchingResources(String packageName,
String regex,
boolean searchSubDirectories)
Parses all classpath resources to locate ones in the provided path which names match the provided
regex.
|
static Collection<Resource> |
getMatchingResources(String packageName,
String regex,
boolean searchSubDirectories,
ClassLoader loader)
Parses all classpath resources to locate ones in the provided path which names match the provided
regex.
|
static Collection<Resource> |
getMatchingResources(String packageName,
String regex,
ClassLoader loader)
Parses all classpath resources to locate ones in the provided path which names match the provided
regex.
|
static URL |
getResource(String name) |
static InputStream |
getResourceAsStream(String name) |
static Enumeration<URL> |
getResources(String name) |
static Class<?> |
loadClass(String name) |
static Class<?> |
loadClass(String name,
boolean initialize) |
public static ClassLoader getClassLoader()
public static Collection<URI> getClassPath() throws IOException
IOException
public static Class<?> loadClass(String name) throws ClassNotFoundException
ClassNotFoundException
ClassLoader.loadClass(java.lang.String)
public static Class<?> loadClass(String name, boolean initialize) throws ClassNotFoundException
ClassNotFoundException
ClassLoader.loadClass(java.lang.String)
public static InputStream getResourceAsStream(String name)
public static Enumeration<URL> getResources(String name) throws IOException
IOException
ClassLoader.getResources(java.lang.String)
public static Collection<Resource> getMatchingResources(String packageName, String regex) throws IOException
IOException
public static Collection<String> getMatchingResourceNames(String packageName, String regex) throws IOException
IOException
getMatchingResources(String, String)
public static Collection<Resource> getMatchingResources(String packageName, String regex, boolean searchSubDirectories) throws IOException
IOException
public static Collection<String> getMatchingResourceNames(String packageName, String regex, boolean searchSubDirectories) throws IOException
IOException
getMatchingResources(String, String, boolean)
public static Collection<Resource> getMatchingResources(String packageName, String regex, ClassLoader loader) throws IOException
IOException
public static Collection<String> getMatchingResourceNames(String packageName, String regex, ClassLoader loader) throws IOException
IOException
getMatchingResources(String, String, ClassLoader)
public static Collection<Resource> getMatchingResources(String packageName, String regex, boolean searchSubDirectories, ClassLoader loader) throws IOException
IOException
public static Collection<String> getMatchingResourceNames(String packageName, String regex, boolean searchSubDirectories, ClassLoader loader) throws IOException
IOException
getMatchingResources(String, String, boolean, ClassLoader)
public static Set<String> getAllJarResourceNames(String pathToUse, String regex, boolean searchSubDirectories, String jarPath) throws IOException
IOException
public static Set<String> getAllJarResourceNames(String pathToUse, Pattern p, boolean searchSubDirectories, String jarPath) throws IOException
IOException
public static Set<Resource> getAllJarResources(String pathToUse, String regex, boolean searchSubDirectories, String jarPath) throws IOException
IOException
public static Set<Resource> getAllJarResources(String pathToUse, Pattern p, boolean searchSubDirectories, String jarPath) throws IOException
IOException
public static Set<String> getAllJarResourceNames(String pathToUse, String regex, boolean searchSubDirectories, URL jarUrl) throws IOException
IOException
public static Set<String> getAllJarResourceNames(String pathToUse, Pattern p, boolean searchSubDirectories, URL jarUrl) throws IOException
IOException
public static Set<Resource> getAllJarResources(String pathToUse, String regex, boolean searchSubDirectories, URL jarUrl) throws IOException
IOException
public static Set<Resource> getAllJarResources(String pathToUse, Pattern p, boolean searchSubDirectories, URL jarUrl) throws IOException
IOException
public static Collection<String> getAllJrtResourceNames(String regex, boolean searchSubDirectories, String firstJrtElement, String... moreJrtElements) throws IOException
IOException