how to show method parameter access_flags in java classfile

91 Views Asked by At

I tried to use javap -v on the classfile, but there is no information about method parameter's access_flags as defined in jvm-4.7.24 .

Is there another tool or approach to show them?

1

There are 1 best solutions below

1
sify On BEST ANSWER

It turns out that MethodParameters doesn't appear in classfile by default. I need to add -parameters option to javac. Once I add that option, javap -v shows parameter names and access_flags. see also:

visitParameter of MethodVisitor is never called
Drawbacks of javac -parameters flag