# Class ClassLoaderUtils

java.lang.Object
org.apache.commons.lang3.ClassLoaderUtils

public class ClassLoaderUtils extends Object
Helps work with `ClassLoader`.

Since:
  3.10

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassLoaderUtils()`
  Deprecated.
  TODO Make private in 4.0.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static URL[]`
  `getSystemURLs()`
  Gets the system class loader's URLs, if any.
  `static URL[]`
  `getThreadURLs()`
  Gets the current thread's context class loader's URLs, if any.
  `static String`
  `toString(ClassLoader classLoader)`
  Converts the given class loader to a String calling `toString(URLClassLoader)`.
  `static String`
  `toString(URLClassLoader classLoader)`
  Converts the given URLClassLoader to a String in the format `"URLClassLoader.toString() + [URL1, URL2, ...]"`.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ClassLoaderUtils

    @Deprecated public ClassLoaderUtils()
    Deprecated.
    TODO Make private in 4.0.
    Make private in 4.0.

- ## Method Details

  - ### getSystemURLs

    public static 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 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 String toString(ClassLoader classLoader)
    Converts the given class loader to a String calling `toString(URLClassLoader)`.
    Parameters:
      `classLoader` - to URLClassLoader to convert.
    Returns:
      the formatted string.

  - ### toString

    public static String toString(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.