[foreign-preview] RFR: 8280597: Refactor java.lang.invoke.MethodHandles::memoryAccessVarHandle

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Mar 7 14:05:53 UTC 2022


This patch renames `MethodHandles::memoryAccessVarHandle` to `MethodHandles:memorySegmentViewVarHandle`, which is consistent with other methods in that class like `byteArrayViewVarHandle` and `byteBufferViewVarHandle`.

When doing this, I also renamed several implementation classes and methods (included some automatically generated ones) to use the new names, and be more consistent with the naming scheme adopted for byte buffer var handle views.

Finally, I tweaked the javadoc to use the new name. When doing this, I realized that the toplevel package javadoc was diving into var handles and combinators way too soon, so I have beefed up the memory segment dereference section (in the `MemorySegment` javadoc) and added a link from the package javadoc to that section.

I'm still not 100% happy about how the memory segment javadoc looks, but for unrelated reasons, and I will deal with that in a separate pass.

-------------

Commit messages:
 - * Rename MethodHandles.memoryAccessVarHandles to memorySegmentViewVarHandle

Changes: https://git.openjdk.java.net/panama-foreign/pull/663/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=663&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8280597
  Stats: 1354 lines in 22 files changed: 649 ins; 635 del; 70 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/663.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/663/head:pull/663

PR: https://git.openjdk.java.net/panama-foreign/pull/663


More information about the panama-dev mailing list