In cases where by Foo can be a non-closing class, you can just prolong the class with the next code and do the same issue:But should you imply that T will be identified, just not statically, you might want to produce equal of TypeReference dynamically. Other questions referenced could presently mention this, but it surely ought to appear a little s