|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.ClasspathUtils
public class ClasspathUtils
Classpath discovery utilities
Constructor Summary | |
---|---|
ClasspathUtils()
|
Method Summary | |
---|---|
static java.util.List<java.lang.String> |
getClassesFromJar(java.net.URL jarUrl)
Get a list of class files in the JAR specified by a URL. |
static ClasspathClasses |
getClassesInClasspathJars()
Gets a list of JARs from the thread context classloader, and returns a ClasspathClasses object with the class file names and the JARs which they appear in. |
static java.util.List<java.net.URL> |
getClassLoaderClasspath(java.lang.ClassLoader classloader)
Get the classpath searched for by a particular classloader (only supports URLClassLoader s presently) |
static ClasspathClasses |
getFilesInClasspathJars()
Gets a list of JARs from the thread context classloader, and returns a ClasspathClasses object with the class file names and the JARs which they appear in. |
static java.net.URL[] |
getSystemClasspath()
This method will return an array of URLs used by the system classloader. |
static java.util.List<java.lang.ClassLoader> |
getThreadContentClassLoaderHierarchy()
Get a list of classloaders in the thread context classloader hierarchy |
static java.net.URL[] |
getThreadContextClasspath()
This method will return an array of URLs used by the thread context classloader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClasspathUtils()
Method Detail |
---|
public static java.net.URL[] getSystemClasspath()
URLClassLoader
, this method will return null
public static java.net.URL[] getThreadContextClasspath()
URLClassLoader
and return all URLs searched by these
classloaders in order of discovery. If no such classloaders are found this method will return null
public static java.util.List<java.lang.ClassLoader> getThreadContentClassLoaderHierarchy()
public static java.util.List<java.net.URL> getClassLoaderClasspath(java.lang.ClassLoader classloader)
URLClassLoader
s presently)
classloader
- to examine
public static java.util.List<java.lang.String> getClassesFromJar(java.net.URL jarUrl)
jarUrl
- the URL of a JAR on the classpath, such as one of the items in the list returned by
getClassLoaderClasspath(ClassLoader)
public static ClasspathClasses getClassesInClasspathJars()
getThreadContextClasspath()
public static ClasspathClasses getFilesInClasspathJars()
getThreadContextClasspath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |