org.reflections.util
Class ClasspathHelper

java.lang.Object
  extended by org.reflections.util.ClasspathHelper

public abstract class ClasspathHelper
extends java.lang.Object

Some classpath convenient methods


Constructor Summary
ClasspathHelper()
           
 
Method Summary
static java.net.URL getBaseUrl(java.net.URL url)
          get's the base url from urls in current classpath
static java.net.URL getBaseUrl(java.net.URL url, java.util.Collection<java.net.URL> baseUrls)
          get's the base url from the given urls
static java.util.Set<java.net.URL> getBaseUrls(java.util.List<java.net.URL> urls, java.util.Collection<java.net.URL> baseUrls)
          get's the base urls from the given urls
static java.net.URL getUrlForClass(java.lang.Class<?> aClass)
          the url that contains the given class.
static java.net.URL getUrlForServletContextClasses(javax.servlet.ServletContext servletContext)
           
static java.util.Set<java.net.URL> getUrlsForCurrentClasspath()
           
static java.util.Set<java.net.URL> getUrlsForManifest(java.net.URL url)
          get the urls that are specified in the manifest of the given url for a jar file.
static java.util.Set<java.net.URL> getUrlsForManifests(java.util.Set<java.net.URL> urls)
          get the urls that are specified in the manifest of the given urls.
static java.util.Set<java.net.URL> getUrlsForManifestsCurrentClasspath()
          get the urls that are in the current class path.
static java.util.Set<java.net.URL> getUrlsForPackagePrefix(java.lang.String packagePrefix)
          returns a set of urls that contain resources with prefix as the given parameter, that is exist in the equivalent directory within the urls of current classpath
static java.util.Set<java.net.URL> getUrlsForWebInfLib(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathHelper

public ClasspathHelper()
Method Detail

getUrlsForPackagePrefix

public static java.util.Set<java.net.URL> getUrlsForPackagePrefix(java.lang.String packagePrefix)
returns a set of urls that contain resources with prefix as the given parameter, that is exist in the equivalent directory within the urls of current classpath


getUrlsForCurrentClasspath

public static java.util.Set<java.net.URL> getUrlsForCurrentClasspath()

getUrlsForWebInfLib

public static java.util.Set<java.net.URL> getUrlsForWebInfLib(javax.servlet.ServletContext servletContext)

getUrlForServletContextClasses

public static java.net.URL getUrlForServletContextClasses(javax.servlet.ServletContext servletContext)

getUrlsForManifestsCurrentClasspath

public static java.util.Set<java.net.URL> getUrlsForManifestsCurrentClasspath()
get the urls that are in the current class path. attempts to load the jar manifest, if any, and adds to the result any dependencies it finds.


getUrlsForManifests

public static java.util.Set<java.net.URL> getUrlsForManifests(java.util.Set<java.net.URL> urls)
get the urls that are specified in the manifest of the given urls. attempts to load the jar manifest, if any, and adds to the result any dependencies it finds.


getUrlsForManifest

public static java.util.Set<java.net.URL> getUrlsForManifest(java.net.URL url)
get the urls that are specified in the manifest of the given url for a jar file. attempts to load the jar manifest, if any, and adds to the result any dependencies it finds.


getUrlForClass

public static java.net.URL getUrlForClass(java.lang.Class<?> aClass)
the url that contains the given class.


getBaseUrl

public static java.net.URL getBaseUrl(java.net.URL url,
                                      java.util.Collection<java.net.URL> baseUrls)
get's the base url from the given urls


getBaseUrl

public static java.net.URL getBaseUrl(java.net.URL url)
get's the base url from urls in current classpath


getBaseUrls

public static java.util.Set<java.net.URL> getBaseUrls(java.util.List<java.net.URL> urls,
                                                      java.util.Collection<java.net.URL> baseUrls)
get's the base urls from the given urls



Copyright © 2010. All Rights Reserved.