Skip to content

Methods containing inner types as parameters cannot be found by reflection. #232

Description

@warownia1

Java reflection mechanism is unable to find methods that has inner types as their parameters as in the example below

package org.example;

public class Outer {
  public static class Inner {}

  public void myMethod(Inner arg0) {}
}

Attempting to get myMethod using Class#getMethod such as Outer.class.getMethod("myMethod", Inner.class); throws an uncaught error in javascript. The error is caused by the name of the method being incorrectly constructed from the parameter types.
getMethod tries to find myMethod$org_example_Outer$Inner when the actual name of the transpiled method is myMethod$org_example_Outer_Inner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions