docs: public static Type getGenericType(final Type type,
                                        final int paramNumber) {
          try {
              final ParameterizedType parameterizedType = ((ParameterizedType) type);
              return (parameterizedType.getActualTypeArguments().length < paramNumber)
                      ? Object.class
                      : parameterizedType.getActualTypeArguments()[paramNumber];
          } catch (Exception e) {
              return Object.class;
          }
      }