Each value layout has a size, an alignment (both expressed in bytes), a byte order, and a carrier, that is, the Java type that should be used when accessing a region of memory using the value layout.
This class defines useful value layout constants for Java primitive types and addresses.
API Note
Some characteristics of the Java layout constants are platform-dependent.
For instance, the byte order of these constants is set to the
native byte order, thus making it easy
to work with other APIs, such as arrays and java..
Implementation Specification
implementing classes and subclasses are immutable, thread-safe and value-based.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| public static interface | ValueLayout.
A value layout whose carrier is |
| Modifier and Type | Field and Description |
|---|---|
| public static final AddressLayout | ADDRESS
An address layout constant whose size is the same as that of a
machine address ( |
| public static final AddressLayout | ADDRESS_UNALIGNED
An unaligned address layout constant whose size is the same as that of a
machine address ( |
| public static final ValueLayout. | JAVA_BOOLEAN
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_BYTE
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_CHAR
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_CHAR_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_DOUBLE
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_DOUBLE_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_FLOAT
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_FLOAT_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_INT
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_INT_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_LONG
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_LONG_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_SHORT
A value layout constant whose size is the same as that of a Java |
| public static final ValueLayout. | JAVA_SHORT_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Java |
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: the carrier associated with this value layoutReturns the carrier associated with this value layout. |
| public ByteOrder | |
| public VarHandle | Returns: a var handle which can be used to access values described by this value layout, in a given memory segmentReturns a var handle which can be used to access values described by this value layout, in a given memory segment. |
| public ValueLayout | withByteAlignment(long byteAlignment)
Redeclares java. Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes). |
| public ValueLayout | withName(String name)
Redeclares java. Returns a memory layout with the same characteristics as this layout, but with the given name. |
| public ValueLayout | |
| public ValueLayout | withoutName()
Redeclares java. Returns a memory layout with the same characteristics as this layout, but with no name. |