Thread
#reflect
    m

    Marc Knaup

    3 years ago
    /**
     * JVM internal name of the class, where package names are separated by '/', and class names are separated by '$',
     * for example: `"org/foo/bar/Baz$Nested"`
     */
    val ClassName.jvmInternalName: String
        get() =
            if (this.isLocal) substring(1)
            else replace('/', '$')
    Isn't it supposed to replace
    .
    with
    $
    , not
    /
    with
    $
    ?
    gildor

    gildor

    3 years ago
    On bytecode level jvm uses
    /
    , not
    .
    like in source code. You can open any bytecode and check
    java.lang.String
    becomes
    java/lang/String
    ilya.gorbunov

    ilya.gorbunov

    3 years ago
    @Marc Knaup seems so. Could you please report a bug?
    m

    Marc Knaup

    3 years ago