@API(status=INTERNAL, since="1.0") public final class ClassLoaderUtils extends 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 and Description |
---|---|
static ClassLoader |
getDefaultClassLoader() |
static Optional<URL> |
getLocation(Object object)
Get the location from which the supplied object's class was loaded.
|
public static ClassLoader getDefaultClassLoader()
public static Optional<URL> getLocation(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