code: public static Class<?> getCollectedType(Type genericType) {
          ParameterizedType pt = (ParameterizedType) genericType;
          if (pt.getActualTypeArguments().length != 1) {
              throw new IllegalArgumentException("genericType");
          }
          return (Class<?>) pt.getActualTypeArguments()[0];
      }
docs: Reflection helper to pull out the type parameter for a List<T>, where T
  is a ODataEntity<?> derived type.
  
  @param genericType
  type object for collection
  @return The class object for the type parameter.