Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318538

Add a way to obtain a strided var handle from a layout

    XMLWordPrintable

Details

    Description

      When dealing with variable-length arrays, it is often useful to derive a var handle from a layout, and have the var handle accept a long coordinate - the logical index of the element at which access should occur.

      Such a method used to exist - namely ValueLayout::arrayElementVarHandle, but it was dropped because (a) it wasn't general enough and (b) the more general version could be obtained via the combinator methods in the `MethodHandles` class.

      However, accessing variable-length array is a common enough operation that deserves some dedicated API sugar.

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: