public static boolean isPrimitiveType(Class<?> type) {
        if (type == boolean.class) {
            return true;
        } else if (type == byte.class) {
            return true;
        } else if (type == char.class) {
            return true;
        } else if (type == short.class) {
            return true;
        } else if (type == int.class) {
            return true;
        } else if (type == float.class) {
            return true;
        } else if (type == long.class) {
            return true;
        } else if (type == double.class) {
            return true;
        } else {
            return false;
        }
    }