cannot select Parameterized Type
You can only learn the value of I and R by capturing them in a subclass definition - otherwise they are erased at runtime. Ex:
class MyStringRestHelper extends RestHelper<String, String> {
Then using something like TypeTools you can resolve the values of I and R:
Class<?>[] typeArgs = TypeResolver.resolveRawArguments(RestHelper.class, MyStringRestHelper.class);Class<?> i = typeArgs[0];Class<?> r = typeArgs[1];assert i == r == String.class;