Package org.apache.commons.lang3
Class ClassLoaderUtils
- java.lang.Object
-
- org.apache.commons.lang3.ClassLoaderUtils
-
public class ClassLoaderUtils extends java.lang.ObjectHelps work withClassLoader.- Since:
- 3.10
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.net.URL[]getSystemURLs()Gets the system class loader's URLs, if any.static java.net.URL[]getThreadURLs()Gets the current thread's context class loader's URLs, if any.static java.lang.StringtoString(java.lang.ClassLoader classLoader)Converts the given class loader to a String callingtoString(URLClassLoader).static java.lang.StringtoString(java.net.URLClassLoader classLoader)Converts the given URLClassLoader to a String in the format"URLClassLoader.toString() + [URL1, URL2, ...]".
-
-
-
Method Detail
-
getSystemURLs
public static java.net.URL[] getSystemURLs()
Gets the system class loader's URLs, if any.- Returns:
- the system class loader's URLs, if any.
- Since:
- 3.13.0
-
getThreadURLs
public static java.net.URL[] getThreadURLs()
Gets the current thread's context class loader's URLs, if any.- Returns:
- the current thread's context class loader's URLs, if any.
- Since:
- 3.13.0
-
toString
public static java.lang.String toString(java.lang.ClassLoader classLoader)
Converts the given class loader to a String callingtoString(URLClassLoader).- Parameters:
classLoader- to URLClassLoader to convert.- Returns:
- the formatted string.
-
toString
public static java.lang.String toString(java.net.URLClassLoader classLoader)
Converts the given URLClassLoader to a String in the format"URLClassLoader.toString() + [URL1, URL2, ...]".- Parameters:
classLoader- to URLClassLoader to convert.- Returns:
- the formatted string.
-
-