private Class<?> getParameterizedType(Class<?> handlerType) {
        Class<?> parameterizedType = null;
        if (handlerType.isAnonymousClass()) {
            parameterizedType = (Class<?>) ((ParameterizedType) handlerType.getGenericInterfaces()[0]).getActualTypeArguments()[0];
        } else {
            parameterizedType = (Class<?>) ((ParameterizedType) handlerType.getGenericSuperclass()).getActualTypeArguments()[0];
        }
        return parameterizedType;
    }