# Uses of Class
jdk.incubator.foreign.ValueLayout.OfInt

Packages that use ValueLayout.OfInt
Package
Description
jdk.incubator.foreign
Classes to support low-level and efficient foreign memory/function access, directly from Java.

## Uses of ValueLayout.OfInt in jdk.incubator.foreign

Fields in jdk.incubator.foreign declared as ValueLayout.OfInt
Modifier and Type
Field
Description
`static final ValueLayout.OfInt`
ValueLayout.`JAVA_INT`
A value layout constant whose size is the same as that of a Java `int`, bit alignment set to 8, and byte order set to `ByteOrder.nativeOrder()`.
Methods in jdk.incubator.foreign that return ValueLayout.OfInt
Modifier and Type
Method
Description
`ValueLayout.OfInt`
ValueLayout.OfInt.`withBitAlignment(long alignmentBits)`
`ValueLayout.OfInt`
ValueLayout.OfInt.`withName(String name)`
`ValueLayout.OfInt`
ValueLayout.OfInt.`withOrder(ByteOrder order)`
Methods in jdk.incubator.foreign with parameters of type ValueLayout.OfInt
Modifier and Type
Method
Description
`VaList.Builder`
VaList.Builder.`addVarg(ValueLayout.OfInt layout, int value)`
Writes an `int` value to the variable argument list being constructed.
`default MemorySegment`
SegmentAllocator.`allocate(ValueLayout.OfInt layout, int value)`
Allocate a memory segment with given layout and initialize it with given int value.
`default MemorySegment`
SegmentAllocator.`allocateArray(ValueLayout.OfInt elementLayout, int[] array)`
Allocate a memory segment with given layout and initialize it with given int array.
`int`
MemoryAddress.`get(ValueLayout.OfInt layout, long offset)`
Reads an int from this address and offset with given layout.
`default int`
MemorySegment.`get(ValueLayout.OfInt layout, long offset)`
Reads an int from this segment and offset with given layout.
`int`
MemoryAddress.`getAtIndex(ValueLayout.OfInt layout, long index)`
Reads an int from this address and index, scaled by given layout size.
`default int`
MemorySegment.`getAtIndex(ValueLayout.OfInt layout, long index)`
Reads an int from this segment and index, scaled by given layout size.
`int`
VaList.`nextVarg(ValueLayout.OfInt layout)`
Reads the next value as an `int` and advances this variable argument list's position.
`void`
MemoryAddress.`set(ValueLayout.OfInt layout, long offset, int value)`
Writes an int to this address instance and offset with given layout.
`default void`
MemorySegment.`set(ValueLayout.OfInt layout, long offset, int value)`
Writes an int to this segment and offset with given layout.
`void`
MemoryAddress.`setAtIndex(ValueLayout.OfInt layout, long index, int value)`
Writes an int to this address instance and index, scaled by given layout size.
`default void`
MemorySegment.`setAtIndex(ValueLayout.OfInt layout, long index, int value)`
Writes an int to this segment and index, scaled by given layout size.
`int[]`
MemorySegment.`toArray(ValueLayout.OfInt elementLayout)`
Copy the contents of this memory segment into a fresh int array.