method.getReturnType()和method.getGenericReturnType()区别

  1. Class clazz = method.getReturnType():只能获取集合类型返回值类型,不能获取集合泛型类型
  2. Type type = method.getGenericReturnType():既能获取集合类型返回值类型,也能获取集合泛型类型
posted @ 2023-08-20 17:34  摆烂ing  阅读(121)  评论(0)    收藏  举报