JDK 14 record type representation in classfile format?
Luke Hutchison
luke.hutch at gmail.com
Sat Mar 21 17:40:41 UTC 2020
How are JDK 14 record types encoded in the classfile format? There is an
8-byte class attribute named "Record", but the format of this attribute is
not documented in the JDK 14 classfile format specification (presumably
because this feature is still in preview).
Also, records have an "InnerClasses" class attribute, with an inner class
name of "java.lang.invoke.MethodHandles$Lookup" and an outer class name of
"java.lang.invoke.MethodHandles". Normally the outer class name matches the
class whose classfile the attribute is contained in. Why is this inner
class attribute there, and why does the outer class name not match the name
of the record?
More information about the jdk-dev
mailing list