There is no Class
instance for any specific instantiation of a generic type (e.g. ResultDto<String>
, ResultDto<Integer>
, ResultDto<MyObject>
, ...).
No matter whether the class is generic or not there is always only one Class
instance which represents raw version of the class. In your case, it is ResultDto.class
.