java.class-file

how to show method parameter access_flags in java classfile


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?


Solution

  • 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