I\'m trying to create a function that takes in an instance of a parameterized class with one type parameter T, and then uses reflection to look at fields of its enveloping class