Here you can find the source of loadClass(String inClassName)
@SuppressWarnings("unchecked") public static <T> Class<T> loadClass(String inClassName) throws ClassNotFoundException, ClassCastException
//package com.java2s; //License from project: Open Source License public class Main { @SuppressWarnings("unchecked") public static <T> Class<T> loadClass(String inClassName) throws ClassNotFoundException, ClassCastException { try {//from w ww. java2s .c o m return (Class<T>) ClassLoader.getSystemClassLoader().loadClass(inClassName); } catch (final Exception e) { // swallow } return (Class<T>) Thread.currentThread().getContextClassLoader().loadClass(inClassName); } }