Here you can find the source of isPrimitive(Class clazz)
public static boolean isPrimitive(Class clazz)
//package com.java2s; //License from project: Apache License import java.util.Map; public class Main { private static Map<Class, Class> wrappers; public static boolean isPrimitive(Class clazz) { return wrappers.containsKey(clazz); }// w w w . ja v a 2s . com }