public class UrlSet extends Object
UrlSet urlSet = new UrlSet(classLoader);
urlSet = urlSet.exclude(ClassLoader.getSystemClassLoader().getParent());
urlSet = urlSet.excludeJavaExtDirs();
urlSet = urlSet.excludeJavaEndorsedDirs();
urlSet = urlSet.excludeJavaHome();
urlSet = urlSet.excludePaths(System.getProperty("sun.boot.class.path", ""));
urlSet = urlSet.exclude(".*?/JavaVM.framework/.*");
urlSet = urlSet.exclude(".*?/activemq-(core|ra)-[\\d.]+.jar(!/)?");
| Modifier and Type | Class and Description |
|---|---|
static interface |
UrlSet.FileProtocolNormalizer |
| Constructor and Description |
|---|
UrlSet(ClassLoaderInterface classLoader) |
UrlSet(ClassLoaderInterface classLoader,
Set<String> protocols) |
UrlSet(Collection<URL> urls)
Ignores all URLs that are not "jar" or "file"
|
UrlSet(URL... urls) |
| Modifier and Type | Method and Description |
|---|---|
UrlSet |
exclude(ClassLoaderInterface parent) |
UrlSet |
exclude(File file) |
UrlSet |
exclude(String pattern) |
UrlSet |
exclude(UrlSet urlSet) |
UrlSet |
excludeJavaEndorsedDirs()
Calls excludePaths(System.getProperty("java.endorsed.dirs"))
|
UrlSet |
excludeJavaExtDirs()
Calls excludePaths(System.getProperty("java.ext.dirs"))
|
UrlSet |
excludeJavaHome() |
UrlSet |
excludePaths(String pathString) |
List<URL> |
getUrls() |
UrlSet |
include(UrlSet urlSet) |
UrlSet |
includeClassesUrl(ClassLoaderInterface classLoaderInterface,
UrlSet.FileProtocolNormalizer normalizer)
Try to find a classes directory inside a war file add its normalized url to this set
|
UrlSet |
matching(String pattern) |
UrlSet |
relative(File file) |
public UrlSet(ClassLoaderInterface classLoader) throws IOException
IOExceptionpublic UrlSet(ClassLoaderInterface classLoader, Set<String> protocols) throws IOException
IOExceptionpublic UrlSet(URL... urls)
public UrlSet(Collection<URL> urls)
urls - public UrlSet exclude(ClassLoaderInterface parent) throws IOException
IOExceptionpublic UrlSet exclude(File file) throws MalformedURLException
MalformedURLExceptionpublic UrlSet exclude(String pattern) throws MalformedURLException
MalformedURLExceptionpublic UrlSet excludeJavaExtDirs() throws MalformedURLException
MalformedURLExceptionpublic UrlSet excludeJavaEndorsedDirs() throws MalformedURLException
MalformedURLExceptionpublic UrlSet excludeJavaHome() throws MalformedURLException
MalformedURLExceptionpublic UrlSet excludePaths(String pathString) throws MalformedURLException
MalformedURLExceptionpublic UrlSet includeClassesUrl(ClassLoaderInterface classLoaderInterface, UrlSet.FileProtocolNormalizer normalizer) throws IOException
IOExceptionpublic UrlSet relative(File file) throws MalformedURLException
MalformedURLExceptionCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.