code: public static boolean isPrimitive(Class<?> javaType)
     {
        return javaType.isPrimitive() || (javaType.isArray() && isPrimitive(javaType.getComponentType()));
     }
docs: True if the given class is a primitive or array of which.