Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.opensymphony.xwork2.util.finder
Class UrlSet

    java.lang.Object
      com.opensymphony.xwork2.util.finder.UrlSet

    public class UrlSet

extends java.lang.Object

Use with ClassFinder to filter the Urls to be scanned, example:

     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(!/)?");

Version:
  $Rev: 894090 $ $Date: 2009-12-27 19:18:29 +0100 (Sun, 27 Dec 2009) $
Author:
  David Blevins

Constructor Summary
`UrlSet(ClassLoaderInterface classLoader)`
`UrlSet(ClassLoaderInterface classLoader, java.util.Set<java.lang.String> protocols)`
`UrlSet(java.util.Collection<java.net.URL> urls)` Ignores all URLs that are not "jar" or "file"
`UrlSet(java.net.URL... urls)`

Method Summary
`UrlSet` | `exclude(ClassLoaderInterface parent)`
`UrlSet` | `exclude(java.io.File file)`
`UrlSet` | `exclude(java.lang.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(java.lang.String pathString)`
`java.util.List<java.net.URL>` | `getUrls()`
`UrlSet` | `include(UrlSet urlSet)`
`UrlSet` | `includeClassesUrl(ClassLoaderInterface classLoaderInterface)` Try to find a classes directory inside a war file add its normalized url to this set
`UrlSet` | `matching(java.lang.String pattern)`
`UrlSet` | `relative(java.io.File file)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UrlSet

    public UrlSet(ClassLoaderInterface classLoader)
           throws java.io.IOException

Throws:
  `java.io.IOException`

### UrlSet

    public UrlSet(ClassLoaderInterface classLoader,
                  java.util.Set<java.lang.String> protocols)
           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` -

Method Detail

### include

    public UrlSet include(UrlSet urlSet)

### exclude

    public UrlSet exclude(UrlSet urlSet)

### exclude

    public UrlSet exclude(ClassLoaderInterface 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`

### excludePaths

    public UrlSet excludePaths(java.lang.String pathString)
                        throws java.net.MalformedURLException

  Throws:
    `java.net.MalformedURLException`

### matching

    public UrlSet matching(java.lang.String pattern)

### includeClassesUrl

    public UrlSet includeClassesUrl(ClassLoaderInterface classLoaderInterface)
                             throws java.io.IOException

  Try to find a classes directory inside a war file add its normalized url to this set

  Throws:
    `java.io.IOException`

### 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.