0

I want to execute a method by using reflect, the method has a parameter which is a List type, and the list type is not stable, maybe List《String》, List《someClass》. ect.

Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
JokerSora
  • 7
  • 3
  • You may find the answer at: https://stackoverflow.com/questions/1942644/get-generic-type-of-java-util-list – Arindam Roy Aug 06 '20 at 04:28
  • What did you try so far? – Alex Aug 06 '20 at 09:12
  • so what I acutally want to do is that, by receiving a method of a string like 'xxxpackage.xxxclass.xxxmethod(List a)',then I want to execute the method by using reflect,however,I don't know how to deal with the 'List'? the generic type is not stable, I had deal with simple params such as 'int,string,' or custom entity class and their array,but I can't deal with their List type – JokerSora Aug 07 '20 at 05:12

0 Answers0