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
IOException
public UrlSet(ClassLoaderInterface classLoader, Set<String> protocols) throws IOException
IOException
public UrlSet(URL... urls)
public UrlSet(Collection<URL> urls)
urls
- public UrlSet exclude(ClassLoaderInterface parent) throws IOException
IOException
public UrlSet exclude(File file) throws MalformedURLException
MalformedURLException
public UrlSet exclude(String pattern) throws MalformedURLException
MalformedURLException
public UrlSet excludeJavaExtDirs() throws MalformedURLException
MalformedURLException
public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException
MalformedURLException
public UrlSet excludeJavaHome() throws MalformedURLException
MalformedURLException
public UrlSet excludePaths(String pathString) throws MalformedURLException
MalformedURLException
public UrlSet includeClassesUrl(ClassLoaderInterface classLoaderInterface, UrlSet.FileProtocolNormalizer normalizer) throws IOException
IOException
public UrlSet relative(File file) throws MalformedURLException
MalformedURLException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.