MemoryLayout, ValueLayoutValueLayoutpublic static sealed interface ValueLayout.OfByte extends ValueLayout
byte.class.MemoryLayout.PathElement
ValueLayout.OfBoolean, ValueLayout.OfByte, ValueLayout.OfChar, ValueLayout.OfDouble, ValueLayout.OfFloat, ValueLayout.OfInt, ValueLayout.OfLong, ValueLayout.OfShort
ADDRESS, ADDRESS_UNALIGNED, JAVA_BOOLEAN, JAVA_BYTE, JAVA_CHAR, JAVA_CHAR_UNALIGNED, JAVA_DOUBLE, JAVA_DOUBLE_UNALIGNED, JAVA_FLOAT, JAVA_FLOAT_UNALIGNED, JAVA_INT, JAVA_INT_UNALIGNED, JAVA_LONG, JAVA_LONG_UNALIGNED, JAVA_SHORT, JAVA_SHORT_UNALIGNED
| Modifier and Type | Method | Description |
|---|---|---|
ValueLayout.OfByte |
withByteAlignment |
Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes). |
ValueLayout.OfByte |
withName |
Returns a memory layout with the same characteristics as this layout, but with the given name. |
ValueLayout.OfByte |
withOrder |
Returns a value layout with the same characteristics as this layout, but with the given byte order. |
ValueLayout.OfByte |
withoutName() |
Returns a memory layout with the same characteristics as this layout, but with no name. |
arrayElementVarHandle, byteAlignment, byteOffset, byteOffsetHandle, byteSize, equals, hashCode, name, scale, scaleHandle, select, sliceHandle, toString, varHandle
carrier, order, varHandle
ValueLayout.OfByte withName(String name)
withName in interface MemoryLayout
withName in interface ValueLayout
name - the layout nameValueLayout.OfByte withoutName()
withoutName in interface MemoryLayout
withoutName in interface ValueLayout
ValueLayout.OfByte withByteAlignment(long byteAlignment)
withByteAlignment in interface MemoryLayout
withByteAlignment in interface ValueLayout
byteAlignment - the layout alignment constraint, expressed in bytesIllegalArgumentException - if byteAlignment is not a power of twoValueLayout.OfByte withOrder(ByteOrder order)
withOrder in interface ValueLayout
order - the desired byte order
© 1993, 2025, 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/25/docs/api/java.base/java/lang/foreign/ValueLayout.OfByte.html