Class ClassUtil

java.lang.Object
org.apache.johnzon.core.util.ClassUtil

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

    • ClassUtil

      private ClassUtil()
  • Method Details

    • 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