| Modifier and Type | Class and Description |
|---|---|
| public static record |
| Modifier and Type | Field and Description |
|---|---|
| private static final Class | |
| private static final MethodHandle | |
| private static final MethodHandle | |
| private static final MethodHandle |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static long | |
| public static MemorySegment | |
| private static byte | |
| public static boolean | |
| public static int | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static StructLayout | Returns: return a struct layout constructed from the given elements, with padding computed automatically so that they are naturally alignedthe structs' fields elements)Returns return a struct layout constructed from the given elements, with padding computed automatically so that they are naturally aligned. |
| private static long | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static MemorySegment | |
| public static MemorySegment | |
| public static MemorySegment | |
| public static MemorySegment | |
| public static MemorySegment | |
| public static MemorySegment | |
| public static VarHandle | Returns: a raw memory segment var handlethe enclosing context of the value layout enclosing, ValueLayout the value layout for which a raw memory segment var handle is to be created layout, boolean if the VH carries a constant offset instead of taking a variable offset constantOffset, long the offset if it is a constant offset)This method returns a var handle that accesses a target layout in an enclosing layout, taking the memory offset and the base offset of the enclosing layout in the segment. |
| private static VarHandle | makeRawSegmentViewVarHandleInternal(MemoryLayout enclosing, ValueLayout layout, boolean constantOffset, long offset)
|
| public static long | |
| public static long | |
| public static String | |
| public static <L extends MemoryLayout> L |
| ADDRESS_CARRIER_TYPE | back to summary |
|---|---|
| private static final Class<?> ADDRESS_CARRIER_TYPE | |
| LONG_TO_ADDRESS_NO_TARGET | back to summary |
|---|---|
| private static final MethodHandle LONG_TO_ADDRESS_NO_TARGET | |
| LONG_TO_ADDRESS_TARGET | back to summary |
|---|---|
| private static final MethodHandle LONG_TO_ADDRESS_TARGET | |
| LONG_TO_CARRIER | back to summary |
|---|---|
| private static final MethodHandle LONG_TO_CARRIER | |
| Utils | back to summary |
|---|---|
| private Utils() | |
| alignUp | back to summary |
|---|---|
| public static long alignUp(long n, long alignment) | |
| alignUp | back to summary |
|---|---|
| public static MemorySegment alignUp(MemorySegment ms, long alignment) | |
| booleanToByte | back to summary |
|---|---|
| private static byte booleanToByte(boolean b) | |
| byteToBoolean | back to summary |
|---|---|
| public static boolean byteToBoolean(byte b) | |
| byteWidthOfPrimitive | back to summary |
|---|---|
| public static int byteWidthOfPrimitive(Class<?> primitive) | |
| checkAlign | back to summary |
|---|---|
| public static void checkAlign(long byteAlignment) | |
| checkAllocationSizeAndAlign | back to summary |
|---|---|
| public static void checkAllocationSizeAndAlign(long byteSize, long byteAlignment) | |
| checkElementAlignment | back to summary |
|---|---|
public static void checkElementAlignment(ValueLayout layout, String msg)
| |
| checkElementAlignment | back to summary |
|---|---|
public static void checkElementAlignment(MemoryLayout layout, String msg)
| |
| checkNonNegativeArgument | back to summary |
|---|---|
public static void checkNonNegativeArgument(long value, String name)
| |
| checkNonNegativeIndex | back to summary |
|---|---|
public static void checkNonNegativeIndex(long value, String name)
| |
| computePaddedStructLayout | back to summary |
|---|---|
| public static StructLayout computePaddedStructLayout(MemoryLayout... elements) Returns return a struct layout constructed from the given elements, with padding computed automatically so that they are naturally aligned. .
| |
| computePadding | back to summary |
|---|---|
| private static long computePadding(long offset, long align) | |
| containsNullChars | back to summary |
|---|---|
| public static boolean containsNullChars(String s) | |
| isAligned | back to summary |
|---|---|
public static boolean isAligned(long offset, long align)
| |
| isElementAligned | back to summary |
|---|---|
public static boolean isElementAligned(ValueLayout layout)
| |
| isPowerOfTwo | back to summary |
|---|---|
| public static boolean isPowerOfTwo(long value) | |
| longToAddress | back to summary |
|---|---|
public static MemorySegment longToAddress(long addr)
| |
| longToAddress | back to summary |
|---|---|
public static MemorySegment longToAddress(int addr)
| |
| longToAddress | back to summary |
|---|---|
public static MemorySegment longToAddress(long addr, AddressLayout layout)
| |
| longToAddress | back to summary |
|---|---|
public static MemorySegment longToAddress(int addr, AddressLayout layout)
| |
| longToAddress | back to summary |
|---|---|
public static MemorySegment longToAddress(long addr, long size, long align)
| |
| longToAddress | back to summary |
|---|---|
public static MemorySegment longToAddress(long addr, long size, long align, MemorySessionImpl scope)
| |
| makeRawSegmentViewVarHandle | back to summary |
|---|---|
| public static VarHandle makeRawSegmentViewVarHandle(MemoryLayout enclosing, ValueLayout layout, boolean constantOffset, long offset) This method returns a var handle that accesses a target layout in an enclosing layout, taking the memory offset and the base offset of the enclosing layout in the segment.
If the offset of the target layout in the enclosing layout is constant, the coordinates are (MS, long).
If the offset of the target layout in the enclosing layout is variable, the coordinates are (MS, long, long).
The trailing long is a pre-validated, variable extra offset, which the var handle does not perform any size or
alignment checks against. Such checks are added (using adaptation) by
We provide two level of caching of the generated var handles. First, the var handle associated
with a
| |
| makeRawSegmentViewVarHandleInternal | back to summary |
|---|---|
| private static VarHandle makeRawSegmentViewVarHandleInternal(MemoryLayout enclosing, ValueLayout layout, boolean constantOffset, long offset) | |
| pointeeByteAlign | back to summary |
|---|---|
| public static long pointeeByteAlign(AddressLayout addressLayout) | |
| pointeeByteSize | back to summary |
|---|---|
| public static long pointeeByteSize(AddressLayout addressLayout) | |
| toHexString | back to summary |
|---|---|
| public static String toHexString(long value) | |
| wrapOverflow | back to summary |
|---|---|
| public static <L extends MemoryLayout> L wrapOverflow(Supplier<L> layoutSupplier) | |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| public static final Utils. | |
| public static final Utils. | |
| public static final Utils. | |
| public static final Utils. | |
| public static final Utils. | |
| public static final Utils. | |
| private final long | |
| public static final Utils. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public static Utils. | |
| public long | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| base | back to summary |
|---|---|
| private final long base Record Component accessed by base(). | |
| BYTE | back to summary |
|---|---|
| public static final Utils. | |
| CHAR | back to summary |
|---|---|
| public static final Utils. | |
| DOUBLE | back to summary |
|---|---|
| public static final Utils. | |
| FLOAT | back to summary |
|---|---|
| public static final Utils. | |
| INT | back to summary |
|---|---|
| public static final Utils. | |
| LONG | back to summary |
|---|---|
| public static final Utils. | |
| scale | back to summary |
|---|---|
| private final long scale Record Component accessed by scale(). | |
| SHORT | back to summary |
|---|---|
| public static final Utils. | |
| BaseAndScale | back to summary |
|---|---|
| public BaseAndScale(long base, long scale) | |
| base | back to summary |
|---|---|
| public long base() Record Component getter of base. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| of | back to summary |
|---|---|
| public static Utils. | |
| scale | back to summary |
|---|---|
| public long scale() Record Component getter of scale. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |