Package org.apache.xbean.finder
Class UrlSet
- java.lang.Object
-
- org.apache.xbean.finder.UrlSet
-
- All Implemented Interfaces:
java.lang.Iterable<java.net.URL>
public class UrlSet extends java.lang.Object implements java.lang.Iterable<java.net.URL>
- Version:
- $Rev$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.net.URL>
urls
-
Constructor Summary
Constructors Modifier Constructor Description UrlSet(java.lang.ClassLoader classLoader)
UrlSet(java.net.URL... urls)
UrlSet(java.util.Collection<java.net.URL> urls)
Ignores all URLs that are not "jar" or "file"private
UrlSet(java.util.Map<java.lang.String,java.net.URL> urls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlSet
exclude(java.io.File file)
UrlSet
exclude(java.lang.ClassLoader parent)
UrlSet
exclude(java.lang.String pattern)
UrlSet
exclude(java.net.URL url)
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
excludeJvm()
UrlSet
excludePaths(java.lang.String pathString)
UrlSet
filter(Filter filter)
java.util.List<java.net.URL>
getUrls()
UrlSet
include(java.net.URL url)
UrlSet
include(UrlSet urlSet)
boolean
isOsx()
java.util.Iterator<java.net.URL>
iterator()
UrlSet
matching(java.lang.String pattern)
UrlSet
relative(java.io.File file)
int
size()
java.lang.String
toString()
-
-
-
Constructor Detail
-
UrlSet
public UrlSet(java.lang.ClassLoader classLoader) throws java.io.IOException
- Throws:
java.io.IOException
-
UrlSet
public UrlSet(java.net.URL... urls)
-
UrlSet
public UrlSet(java.util.Collection<java.net.URL> urls)
Ignores all URLs that are not "jar" or "file"- Parameters:
urls
-
-
UrlSet
private UrlSet(java.util.Map<java.lang.String,java.net.URL> urls)
-
-
Method Detail
-
include
public UrlSet include(java.net.URL url)
-
exclude
public UrlSet exclude(java.net.URL url)
-
exclude
public UrlSet exclude(java.lang.ClassLoader parent) throws java.io.IOException
- Throws:
java.io.IOException
-
exclude
public UrlSet exclude(java.io.File file) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
exclude
public UrlSet exclude(java.lang.String pattern) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
excludeJavaExtDirs
public UrlSet excludeJavaExtDirs() throws java.net.MalformedURLException
Calls excludePaths(System.getProperty("java.ext.dirs"))- Returns:
- Throws:
java.net.MalformedURLException
-
excludeJavaEndorsedDirs
public UrlSet excludeJavaEndorsedDirs() throws java.net.MalformedURLException
Calls excludePaths(System.getProperty("java.endorsed.dirs"))- Returns:
- Throws:
java.net.MalformedURLException
-
excludeJavaHome
public UrlSet excludeJavaHome() throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
excludeJvm
public UrlSet excludeJvm() throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
excludePaths
public UrlSet excludePaths(java.lang.String pathString) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
matching
public UrlSet matching(java.lang.String pattern)
-
relative
public UrlSet relative(java.io.File file) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
getUrls
public java.util.List<java.net.URL> getUrls()
-
size
public int size()
-
iterator
public java.util.Iterator<java.net.URL> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<java.net.URL>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isOsx
public boolean isOsx()
-
-