Class 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 Detail

      • urls

        private final java.util.Map<java.lang.String,​java.net.URL> urls
    • 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 interface java.lang.Iterable<java.net.URL>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isOsx

        public boolean isOsx()