Here you can find the source of isPrimitiveClass(Class> cls)
public static boolean isPrimitiveClass(Class<?> cls)
//package com.java2s; import java.util.Map; public class Main { static private Map<Class<?>, Class<?>> primitiveClasses; public static boolean isPrimitiveClass(Class<?> cls) { return getWrapperClass(cls) != null; }/* w w w .ja va2 s .co m*/ public static Class<?> getWrapperClass(Class<?> primitiveClass) { return primitiveClasses.get(primitiveClass); } }