メソッドが返すタイプをクラスに一致させる必要があります。どうやってやるの?
public class MethodTest {
public static List<String> getStringList()
{
return null;
}
public static void main(String[] args)
{
for(Method method : MethodTest.class.getMethods())
{
Type returnType = method.getGenericReturnType();
// How can for example test if returnType is class List?
}
}
}