1

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?

sify
  • 645
  • 9
  • 19

1 Answers1

3

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

sify
  • 645
  • 9
  • 19
  • 1
    With the exception of canonical `record` constructors, which always have the parameter names included. – Holger Nov 14 '22 at 16:14