Here you can find the source of getClass(String className)
public static Class<?> getClass(String className) throws ClassNotFoundException
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { private static Map<String, Class<?>> builtinDataTypeMap = new HashMap<String, Class<?>>(); public static Class<?> getClass(String className) throws ClassNotFoundException { if (builtinDataTypeMap.containsKey(className)) { return builtinDataTypeMap.get(className); } else {//from ww w.j a v a 2 s.c o m return Class.forName(className); } } }