I'm using Spring boot and I'm doing reflection to extract classes within my package ending with "Repository" and all fields declared as MyGenericClass<T,R>
. My problem is that I am unable to extract ClassA
and ClassB
from myField
public class ContainerRepository{
private MyGenericClass<ClassA, ClassB> myField;}
I wish to run the same code against:
public class ProcessRepository{
private MyGenericClass<ClassC, ClassD> anotherField;}
and getClassC
and ClassD
from anotherField