MemoryLayoutPREVIEW
public static sealed interface MemoryLayout.PathElement
PathElement
is a preview API of the Java platform. GroupLayout
PREVIEW, either by name or by index;SequenceLayout
PREVIEW; andModifier and Type | Method | Description |
---|---|---|
static MemoryLayout.PathElementPREVIEW |
dereferenceElement() |
Returns a path element which dereferences an address layout as its target layoutPREVIEW (where set). |
static MemoryLayout.PathElementPREVIEW |
groupElement |
Returns a path element which selects a member layout with the given index in a group layout. |
static MemoryLayout.PathElementPREVIEW |
groupElement |
Returns a path element which selects a member layout with the given name in a group layout. |
static MemoryLayout.PathElementPREVIEW |
sequenceElement() |
Returns an open path element which selects an unspecified element layout in a sequence layout. |
static MemoryLayout.PathElementPREVIEW |
sequenceElement |
Returns a path element which selects the element layout at the specified position in a sequence layout. |
static MemoryLayout.PathElementPREVIEW |
sequenceElement |
Returns an open path element which selects the element layout in a range of positions in a sequence layout. |
static MemoryLayout.PathElementPREVIEW groupElement(String name)
groupElement(long)
might be preferable.name
- the name of the member layout to be selected.static MemoryLayout.PathElementPREVIEW groupElement(long index)
index
- the index of the member layout element to be selected.IllegalArgumentException
- if index < 0
.static MemoryLayout.PathElementPREVIEW sequenceElement(long index)
index
- the index of the sequence element to be selected.IllegalArgumentException
- if index < 0
.static MemoryLayout.PathElementPREVIEW sequenceElement(long start, long step)
S
and step factor (which can also be negative) F
. The exact sequence element selected by this layout is expressed as an index I
. If C
is the sequence element count, it follows that 0 <= I < B
, where B
is computed as follows:
F > 0
, then B = ceilDiv(C - S, F)
F < 0
, then B = ceilDiv(-(S + 1), -F)
start
- the index of the first sequence element to be selected.step
- the step factor at which subsequence sequence elements are to be selected.IllegalArgumentException
- if start < 0
, or step == 0
.static MemoryLayout.PathElementPREVIEW sequenceElement()
The exact sequence element selected by this layout is expressed as an index I
. If C
is the sequence element count, it follows that 0 <= I < C
.
static MemoryLayout.PathElementPREVIEW dereferenceElement()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/foreign/MemoryLayout.PathElement.html
PathElement
when preview features are enabled.