Java Class Load loadClass(String className)

Here you can find the source of loadClass(String className)

Description

load Class

License

Open Source License

Declaration

public static Class loadClass(String className) throws ClassNotFoundException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static Class loadClass(String className) throws ClassNotFoundException {
        return loadClass(className, getContextClassLoader());
    }//from  w  w  w .j a  v  a 2s  . c o m

    public static Class loadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
        if (className == null) {
            return null;
        }

        if (classLoader == null) {
            return Class.forName(className);
        } else {
            return Class.forName(className, true, classLoader);
        }
    }

    public static ClassLoader getContextClassLoader() {
        return Thread.currentThread().getContextClassLoader();
    }
}

Related

  1. loadClass(String className)
  2. loadClass(String className)
  3. loadClass(String className)
  4. loadClass(String className)
  5. loadClass(String className)
  6. loadClass(String className)
  7. loadClass(String className)
  8. loadClass(String className)
  9. loadClass(String className)