Here you can find the source of classForName(final String className)
public static <T> Class<T> classForName(final String className)
//package com.java2s; public class Main { public static <T> Class<T> classForName(final String className) { return classForName(className, false); }/*w w w .j a va 2 s. co m*/ @SuppressWarnings("unchecked") public static <T> Class<T> classForName(final String className, boolean ignoreException) { try { return (Class<T>) Class.forName(className); } catch (Error | Exception ex) { if (!ignoreException) { throw new Error("Error loading class: " + className, ex); } } return null; } }