private Class getGenericInfo(Type type) {
        Class clazz = null;
        if (type instanceof ParameterizedType && ((ParameterizedType) type).getActualTypeArguments().length > 0) {
            clazz = (Class) ((ParameterizedType) type).getActualTypeArguments()[0];
        }
        return clazz;
    }