参考了Retrofit的解析返回类型的代码
- 获取返回类型
Method method = this.getClass().getDeclaredMethod("execute", Request.class, Integer.class);
Type type = method.getGenericReturnType();
- 获取类的泛型参数
@SuppressWarnings</
参考了Retrofit的解析返回类型的代码
Method method = this.getClass().getDeclaredMethod("execute", Request.class, Integer.class);
Type type = method.getGenericReturnType();
@SuppressWarnings</