Package org.junit.platform.commons.util
Class ClassLoaderUtils
- java.lang.Object
-
- org.junit.platform.commons.util.ClassLoaderUtils
-
@API(status=INTERNAL, since="1.0") public final class ClassLoaderUtils extends java.lang.ObjectCollection of utilities for working with ClassLoader and associated tasks.DISCLAIMER
These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!
- Since:
- 1.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ClassLoadergetDefaultClassLoader()static java.util.Optional<java.net.URL>getLocation(java.lang.Object object)Get the location from which the supplied object's class was loaded.
-
-
-
Method Detail
-
getDefaultClassLoader
public static java.lang.ClassLoader getDefaultClassLoader()
-
getLocation
public static java.util.Optional<java.net.URL> getLocation(java.lang.Object object)
Get the location from which the supplied object's class was loaded.- Parameters:
object- the object for whose class the location should be retrieved- Returns:
- an
Optionalcontaining the URL of the class' location; nevernullbut potentially empty
-
-