Native methods in unnamed classes
Tagir Valeev
amaembo at gmail.com
Thu Jul 20 09:17:03 UTC 2023
Hello!
A quick question about unnamed classes specification draft [1]. I
don't see that native methods are explicitly forbidden inside unnamed
classes. If they are allowed, it's not quite clear how to define the
name of the corresponding method in the native library according to
[2], as the binary name of an unnamed class can be arbitrarily defined
by java compiler (JLS 13.1). Or is this not a problem?
With best regards,
Tagir Valeev
[1] https://cr.openjdk.org/~gbierman/jep445/jep445-20230524/specs/unnamed-classes-instance-main-methods-jls.html
[2] https://docs.oracle.com/en/java/javase/20/docs/specs/jni/design.html#resolving-native-method-names
More information about the amber-spec-experts
mailing list