Class ClassUtil


  • public final class ClassUtil
    extends Object
    ClassLoader related utils
    • Constructor Detail

      • ClassUtil

        private ClassUtil()
    • 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 loaded
        ignoreBrokenClasses - if NoClassDefFoundError should be ignored
        Returns:
        Class or null if the class could not be found