Java tutorial
//package com.java2s; public class Main { private static boolean isBaseClass(Class clazz) { return clazz.isPrimitive() || clazz == Integer.class || clazz == Long.class || clazz == Float.class || clazz == Double.class || clazz == Boolean.class || clazz == String.class; } }