public final class ClassLoaderUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getUserCodeClassLoaderInfo(ClassLoader loader)
Gets information about URL class loaders.
|
static boolean |
validateClassLoadable(ClassNotFoundException cnfe,
ClassLoader cl)
Checks, whether the class that was not found in the given exception, can be resolved through
the given class loader.
|
public static String getUserCodeClassLoaderInfo(ClassLoader loader)
NOTE: This method makes a best effort to provide information about the classloader, and never throws an exception.
NOTE: Passing ClassLoader.getSystemClassLoader()
on Java 9+ will not return
anything interesting.
loader
- The classloader to get the info string for.public static boolean validateClassLoadable(ClassNotFoundException cnfe, ClassLoader cl)
cnfe
- The ClassNotFoundException that defines the name of the class.cl
- The class loader to use for the class resolution.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.