• Post Reply Bookmark Topic Watch Topic
  • New Topic

javaparser generic method  RSS feed

 
Miro Malac
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can I parse generic method with javaparser ?? If its possible so how? For example this is my method:



When I parse with MethodVisitor and use MethodVisitor.getParameters().getType I get E[] but I need to get that it is Object. It is posible?
 
Liutauras Vilda
Sheriff
Posts: 4923
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use List class for such a problems, ArrayList or LinkedList and then iterator().
Read about it, I hope it will be clear.
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Yes, I am sure you can, but you should start with the handbook for your application or its tutorials. I fail to see what Lists have to do with it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!