Java Class forName forName(String name)

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

Description

for Name

License

Apache License

Declaration

public static Class<?> forName(String name) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static Class<?> forName(String name) {
        return forName(name, null);
    }//  w  w  w . ja v  a 2s .  c  om

    public static Class<?> forName(String name, ClassLoader loader) {
        try {
            if (loader == null) {
                return Class.forName(name);
            }
            return Class.forName(name, true, loader);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. forName(String className, Class instanceOfClass)
  2. forName(String className, Class superType)
  3. forName(String className, Class xface)
  4. forName(String className, ClassLoader classLoader)
  5. forName(String className, ClassLoader defaultClassLoader)
  6. forName(String name)
  7. forName(String name)
  8. forName(String name)
  9. forName(String name)