Android examples for java.lang.reflect:Base Type
is Base Data Type
//package com.java2s; import java.util.Date; public class Main { public static boolean isBaseDataType(Class<?> clazz) { return clazz.isPrimitive() || clazz.equals(String.class) || clazz.equals(Boolean.class) || clazz.equals(Integer.class) || clazz.equals(Long.class) || clazz.equals(Float.class) || clazz.equals(Double.class) || clazz.equals(Byte.class) || clazz.equals(Character.class) || clazz.equals(Short.class) || clazz.equals(Date.class) || clazz.equals(byte[].class) || clazz.equals(Byte[].class); }//w ww . ja v a 2 s. com }