Uses of Class
jdk.incubator.foreign.ValueLayout
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of ValueLayout in jdk.incubator.foreign
Modifier and TypeFieldDescriptionstatic final ValueLayout
MemoryLayouts.ADDRESS
A value layout constant whose size is the same as that of a machine address (e.g.static final ValueLayout
MemoryLayouts.BITS_16_BE
A value layout constant with size of two bytes, and byte order set toByteOrder.BIG_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_16_LE
A value layout constant with size of two bytes, and byte order set toByteOrder.LITTLE_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_32_BE
A value layout constant with size of four bytes, and byte order set toByteOrder.BIG_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_32_LE
A value layout constant with size of four bytes, and byte order set toByteOrder.LITTLE_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_64_BE
A value layout constant with size of eight bytes, and byte order set toByteOrder.BIG_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_64_LE
A value layout constant with size of eight bytes, and byte order set toByteOrder.LITTLE_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_8_BE
A value layout constant with size of one byte, and byte order set toByteOrder.BIG_ENDIAN
.static final ValueLayout
MemoryLayouts.BITS_8_LE
A value layout constant with size of one byte, and byte order set toByteOrder.LITTLE_ENDIAN
.static final ValueLayout
CLinker.C_CHAR
The layout for thechar
C typestatic final ValueLayout
CLinker.C_DOUBLE
The layout for thedouble
C typestatic final ValueLayout
CLinker.C_FLOAT
The layout for thefloat
C typestatic final ValueLayout
CLinker.C_INT
The layout for theint
C typestatic final ValueLayout
CLinker.C_LONG
The layout for thelong
C typestatic final ValueLayout
CLinker.C_LONG_LONG
The layout for thelong long
C type.static final ValueLayout
CLinker.C_POINTER
TheT*
native type.static final ValueLayout
CLinker.C_SHORT
The layout for theshort
C typestatic final ValueLayout
MemoryLayouts.JAVA_BYTE
A value layout constant whose size is the same as that of a Javabyte
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout
MemoryLayouts.JAVA_CHAR
A value layout constant whose size is the same as that of a Javachar
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout
MemoryLayouts.JAVA_DOUBLE
A value layout constant whose size is the same as that of a Javadouble
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout
MemoryLayouts.JAVA_FLOAT
A value layout constant whose size is the same as that of a Javafloat
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout
MemoryLayouts.JAVA_INT
A value layout constant whose size is the same as that of a Javaint
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout
MemoryLayouts.JAVA_LONG
A value layout constant whose size is the same as that of a Javalong
, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout
MemoryLayouts.JAVA_SHORT
A value layout constant whose size is the same as that of a Javashort
, and byte order set toByteOrder.nativeOrder()
.Modifier and TypeMethodDescriptionstatic ValueLayout
MemoryLayout.valueLayout
(long size, ByteOrder order) Create a value layout of given byte order and size.ValueLayout.withAttribute
(String name, Constable value) Returns a new memory layout which features the same attributes as this layout, plus the newly specified attribute.ValueLayout.withBitAlignment
(long alignmentBits) Creates a new layout which features the desired alignment constraint.Creates a new layout which features the desired layout name.Returns a new value layout with given byte order.Modifier and TypeMethodDescriptiondefault MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, byte value) Allocate a block of memory with given layout and initialize it with given byte value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, char value) Allocate a block of memory with given layout and initialize it with given char value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, double value) Allocate a block of memory with given layout and initialize it with given double value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, float value) Allocate a block of memory with given layout and initialize it with given float value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, int value) Allocate a block of memory with given layout and initialize it with given int value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, long value) Allocate a block of memory with given layout and initialize it with given long value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, short value) Allocate a block of memory with given layout and initialize it with given short value.default MemorySegment
SegmentAllocator.allocate
(ValueLayout layout, Addressable value) Allocate a block of memory with given layout and initialize it with given address value (expressed as anAddressable
instance).default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, byte[] array) Allocate a block of memory with given layout and initialize it with given byte array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, char[] array) Allocate a block of memory with given layout and initialize it with given char array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, double[] array) Allocate a block of memory with given layout and initialize it with given double array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, float[] array) Allocate a block of memory with given layout and initialize it with given float array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, int[] array) Allocate a block of memory with given layout and initialize it with given int array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, long[] array) Allocate a block of memory with given layout and initialize it with given long array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, short[] array) Allocate a block of memory with given layout and initialize it with given short array.default MemorySegment
SegmentAllocator.allocateArray
(ValueLayout elementLayout, Addressable[] array) Allocate a block of memory with given layout and initialize it with given address array.CLinker.VaList.Builder.vargFromAddress
(ValueLayout layout, Addressable value) Adds a native value represented as aMemoryAddress
to the Cva_list
being constructed.CLinker.VaList.Builder.vargFromDouble
(ValueLayout layout, double value) Adds a native value represented as adouble
to the Cva_list
being constructed.CLinker.VaList.Builder.vargFromInt
(ValueLayout layout, int value) Adds a native value represented as anint
to the Cva_list
being constructed.CLinker.VaList.Builder.vargFromLong
(ValueLayout layout, long value) Adds a native value represented as along
to the Cva_list
being constructed.