1

I want to pass in a generic type to the ClientResource get API. I am calling the following Restlet API and receiving an error.

SearchHit<T> result = new ClientResource(URL).get(new TypeReference<SearchHit<T>>(){}.getClass());
Type mismatch: cannot convert from capture#1-of ? extends new TypeReference<SearchHit<T>>(){} to SearchHit<T>

Any ideas?

Thanks in advance.

user481779
  • 1,071
  • 2
  • 14
  • 28

0 Answers0