Here you can find the source of isPrimitiveType(Class> clazz)
public static boolean isPrimitiveType(Class<?> clazz)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static boolean isPrimitiveType(Class<?> clazz) { if (clazz != null) { return clazz.isPrimitive() || clazz.isEnum() || Number.class.isAssignableFrom(clazz) || String.class.isAssignableFrom(clazz) || Boolean.class.isAssignableFrom(clazz) || Character.class.isAssignableFrom(clazz) || Date.class.isAssignableFrom(clazz); }//from w w w . j av a 2 s.c o m return false; } }