Java Class Load loadClass(ClassLoader classLoader, String fullyQualifiedClassName)

Here you can find the source of loadClass(ClassLoader classLoader, String fullyQualifiedClassName)

Description

Load a class.

License

Open Source License

Parameter

Parameter Description
classLoader The class loader.
fullyQualifiedClassName The fully qualified class name.

Return

The class object.

Declaration

public static Class<?> loadClass(ClassLoader classLoader, String fullyQualifiedClassName) 

Method Source Code

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

public class Main {
    /**/*ww w  .j a  v  a2s.c o  m*/
     * Load a class.
     *
     * @param classLoader The class loader.
     * @param fullyQualifiedClassName The fully qualified class name.
     * @return The class object.
     */
    public static Class<?> loadClass(ClassLoader classLoader, String fullyQualifiedClassName) {
        try {
            return classLoader.loadClass(fullyQualifiedClassName);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. loadClass(Class clazz)
  2. loadClass(Class contextClass, String className)
  3. loadClass(ClassLoader classLoader, Class clazz, String postfix)
  4. loadClass(ClassLoader classLoader, String className)
  5. loadClass(ClassLoader classLoader, String className)
  6. loadClass(ClassLoader loader, String className)
  7. loadClass(ClassLoader loader, String className, String errorMessage)
  8. loadClass(final ClassLoader cl, final String cname)
  9. loadClass(final ClassLoader classLoader, final String classname)