public abstract class VfNetCallback<T> extends AbsCallback<VfNetResponse<T>> {
@Override
public VfNetResponse<T> parseNetworkResponse(Response response, int id) throws Exception {
VfNetResponse<T> netResponse = JSON.parseObject(response.body().toString(), VfNetResponse<T>.class);
return netResponse;
}
}
I can use Class< T > dataClass = (Class < T >) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
to get the class of T. But now I want to get the class of VfNetResponse< T > ?
Aucun commentaire:
Enregistrer un commentaire