Package Summary  Overview Summary

class:ValueLayout.OfAddress [NONE]

All Implemented Interfaces:
MemoryLayoutPREVIEW
Enclosing class:
ValueLayoutPREVIEW

public static final class ValueLayout.OfAddressextends ValueLayoutPREVIEW
OfAddress is a preview API of the Java platform.
Programs can only use OfAddress when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A value layout whose carrier is MemoryAddress.class.
Since:
19

method:withName(java.lang.String) [NONE]

  • withName

    public ValueLayout.OfAddressPREVIEW withName (String name)
    Description copied from class: ValueLayout
    Returns a memory layout with the same size and alignment constraints as this layout, but with the specified name.
    Specified by:
    withName in interface MemoryLayoutPREVIEW
    Overrides:
    withName in class ValueLayoutPREVIEW
    Parameters:
    name - the layout name.
    Returns:
    a memory layout with the given name.
    See Also:
  • method:withBitAlignment(long) [NONE]

    withBitAlignment

    public ValueLayout.OfAddressPREVIEW withBitAlignment (long alignmentBits)
    Description copied from class: ValueLayout
    Returns a memory layout with the same size and name as this layout, but with the specified alignment constraints (in bits).
    Specified by:
    withBitAlignment in interface MemoryLayoutPREVIEW
    Overrides:
    withBitAlignment in class ValueLayoutPREVIEW
    Parameters:
    alignmentBits - the layout alignment constraint, expressed in bits.
    Returns:
    a memory layout with the given alignment constraints.

    method:withOrder(java.nio.ByteOrder) [NONE]

    withOrder

    public ValueLayout.OfAddressPREVIEW withOrder (ByteOrder order)
    Description copied from class: ValueLayout
    Returns a value layout with the same carrier, alignment constraints and name as this value layout, but with the specified byte order.
    Overrides:
    withOrder in class ValueLayoutPREVIEW
    Parameters:
    order - the desired byte order.
    Returns:
    a value layout with the given byte order.

    method:name() [NONE]

    name

    public final  Optional<String> name()
    Description copied from interface: MemoryLayout
    Returns the name (if any) associated with this layout.
    Specified by:
    name in interface MemoryLayoutPREVIEW
    Returns:
    the name (if any) associated with this layout
    See Also:

    method:bitAlignment() [NONE]

    bitAlignment

    public final  long bitAlignment()
    Description copied from interface: MemoryLayout
    Returns the alignment constraint associated with this layout, expressed in bits. Layout alignment defines a power of two A which is the bit-wise alignment of the layout. If A <= 8 then A/8 is the number of bytes that must be aligned for any pointer that correctly points to this layout. Thus:
    • A=8 means unaligned (in the usual sense), which is common in packets.
    • A=64 means word aligned (on LP64), A=32 int aligned, A=16 short aligned, etc.
    • A=512 is the most strict alignment required by the x86/SV ABI (for AVX-512 data).
    If no explicit alignment constraint was set on this layout (see MemoryLayout.withBitAlignment(long)PREVIEW), then this method returns the natural alignment constraint (in bits) associated with this layout.
    Specified by:
    bitAlignment in interface MemoryLayoutPREVIEW
    Returns:
    the layout alignment constraint, in bits.

    method:byteSize() [NONE]

    byteSize

    public long byteSize()
    Description copied from interface: MemoryLayout
    Returns the layout size, in bytes.
    Specified by:
    byteSize in interface MemoryLayoutPREVIEW
    Returns:
    the layout size, in bytes

    method:bitSize() [NONE]

    bitSize

    public long bitSize()
    Description copied from interface: MemoryLayout
    Returns the layout size, in bits.
    Specified by:
    bitSize in interface MemoryLayoutPREVIEW
    Returns:
    the layout size, in bits

    method:isPadding() [NONE]

    isPadding

    public boolean isPadding()
    Description copied from interface: MemoryLayout
    Returns true, if this layout is a padding layout.
    Specified by:
    isPadding in interface MemoryLayoutPREVIEW
    Returns:
    true, if this layout is a padding layout