Java Class Load classForName(String name)

Here you can find the source of classForName(String name)

Description

class For Name

License

Open Source License

Declaration

public static Class classForName(String name) throws ClassNotFoundException 

Method Source Code

//package com.java2s;

public class Main {
    public static Class classForName(String name) throws ClassNotFoundException {
        try {//from  www.  j  av a 2s . c o m
            ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
            if (contextClassLoader != null) {
                return contextClassLoader.loadClass(name);
            }
        } catch (Throwable ignore) {
        }
        return Class.forName(name);
    }
}

Related

  1. classForName(String name)
  2. classForName(String name)
  3. classForName(String name)
  4. classForName(String name)
  5. classForName(String name)
  6. classForName(String name, ClassLoader classLoader)
  7. classForName(String str)
  8. classForName(String typeName)
  9. classForName(String typeName)