Package org.apache.johnzon.core.util
Class ClassUtil
- java.lang.Object
-
- org.apache.johnzon.core.util.ClassUtil
-
public final class ClassUtil extends Object
ClassLoader related utils
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ClassUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClassLoader
getClassLoader()
static Class<?>
loadClassOptional(String className, boolean ignoreBrokenClasses)
-
-
-
Method Detail
-
getClassLoader
public static ClassLoader getClassLoader()
- Returns:
- either the ThreadContextClassLoader or the CL of this very class if no TCCL exists
-
loadClassOptional
public static Class<?> loadClassOptional(String className, boolean ignoreBrokenClasses)
- Parameters:
className
- to be loadedignoreBrokenClasses
- ifNoClassDefFoundError
should be ignored- Returns:
- Class or
null
if the class could not be found
-
-