On this page

ClassLoaderUtils

public class org.apache.commons.lang3.ClassLoaderUtils[source]

Helps work with ClassLoader.

Since:

3.10

Constructors

ClassLoaderUtils()

Deprecated. Make private in 4.0.

@Deprecated public ClassLoaderUtils()[source]

Deprecated: TODO Make private in 4.0.

Make private in 4.0.

Methods

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, ...]".

public static URL[] getSystemURLs()[source]

Gets the system class loader's URLs, if any.

Returns:

The system class loader's URLs, if any.

Since:

3.13.0

public static URL[] getThreadURLs()[source]

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

public static String toString(ClassLoader classLoader)[source]

Converts the given class loader to a String calling toString(URLClassLoader).

Parameters:

classLoader – to URLClassLoader to convert.

Returns:

The formatted string.

public static String toString(URLClassLoader classLoader)[source]

Converts the given URLClassLoader to a String in the format "URLClassLoader.toString() + [URL1, URL2, ...]".

Parameters:

classLoader – to URLClassLoader to convert.

Returns:

The formatted string.