@API(status=INTERNAL, since="1.0") public final class ClassLoaderUtils extends java.lang.Object
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!
Modifier and Type | Method | Description |
---|---|---|
static java.lang.ClassLoader |
getDefaultClassLoader() |
|
static java.util.Optional<java.net.URL> |
getLocation(java.lang.Object object) |
Get the location from which the supplied object's class was loaded.
|
public static java.lang.ClassLoader getDefaultClassLoader()
public static java.util.Optional<java.net.URL> getLocation(java.lang.Object object)
object
- the object for whose class the location should be retrievedOptional
containing the URL of the class' location; never
null
but potentially empty