Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

javac -parameters support #106

Description

@jonpryor

Java 8's javac now supports storing method parameter name information within .class files, using the javac -parameters option. Consider the following Java code:

class f {
	public void m (String a, int b, int[] c) {
	}
}

If we compile with:

javac -parameters f.java

We can see that there's a new MethodParameters metadata blob:

$ mono class-parse.exe f.class --dump
...
        10: Utf8("MethodParameters")
...
        1: m (Ljava/lang/String;I[I)V Public
                Code(1, Unknown[LineNumberTable](6))
                Unknown[MethodParameters](13)

class-parse needs support for the new MethodParameters Attribute blob:

MethodParameters_attribute {
    u2 attribute_name_index;
    u4 attribute_length;
    u1 parameters_count;
    {   u2 name_index;
        u2 access_flags;
    } parameters[parameters_count];
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions