Class ClassUtils


  • public class ClassUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Class<?> classForNameWithException​(java.lang.String name, java.lang.ClassLoader cl)
      Get the Class from the class name.
      static java.lang.ClassLoader getContextClassLoader()
      Get the context class loader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • classForNameWithException

        public static java.lang.Class<?> classForNameWithException​(java.lang.String name,
                                                                   java.lang.ClassLoader cl)
                                                            throws java.lang.ClassNotFoundException
        Get the Class from the class name.
        Parameters:
        name - the class name.
        cl - the class loader to use, if null then the defining class loader of this class will be utilized.
        Returns:
        the Class, otherwise null if the class cannot be found.
        Throws:
        java.lang.ClassNotFoundException - if the class cannot be found.
      • getContextClassLoader

        public static java.lang.ClassLoader getContextClassLoader()
        Get the context class loader.
        Returns:
        the context class loader, otherwise null security privilages are not set.