I need to get the method parameter names using asm 5.2. My sources are java 1.8. Looking at the javadoc of MethodVisitor#visitParameter
it seems that this is exactly what I need:
Visits a parameter of this method.
But this method is never called. I thought it might be related to missing debugging information, so I compiled the classes with -g:source,lines,vars
, but this didn't help either.
I resorted to using visitLocalVariable
, but for the purpose of the utility that I'm writing I don't care about the method's code, so I was looking at providing the ClassReader.SKIP_CODE
to the ClassReader's accept method.
I'm I missing something? Is there a way to get the parameter names w/o visiting the code.