APIdia Launch Partner
Top Description Methods
java.lang.foreign

public sealed Interface PaddingLayout

extends MemoryLayout
permits PaddingLayoutImpl
Known Direct Implementers
jdk.internal.foreign.layout.PaddingLayoutImpl
Imports
jdk.internal.foreign.layout.PaddingLayoutImpl

A padding layout. A padding layout specifies the size of extra space which is typically not accessed by applications, and is typically used for aligning member layouts around word boundaries.

Implementation Specification

Implementing classes are immutable, thread-safe and value-based.

Since
22

Method Summary

Modifier and TypeMethod and Description
public PaddingLayout
withByteAlignment(long byteAlignment)

Redeclares java.lang.foreign.MemoryLayout.withByteAlignment.

Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).

public PaddingLayout
withName(String name)

Redeclares java.lang.foreign.MemoryLayout.withName.

Returns a memory layout with the same characteristics as this layout, but with the given name.

public PaddingLayout
withoutName()

Redeclares java.lang.foreign.MemoryLayout.withoutName.

Returns a memory layout with the same characteristics as this layout, but with no name.

Inherited from java.lang.foreign.MemoryLayout:
arrayElementVarHandlebyteAlignmentbyteOffsetbyteOffsetHandlebyteSizeequalshashCodenamepaddingLayoutscalescaleHandleselectsequenceLayoutsliceHandlestructLayouttoStringunionLayoutvarHandle

Method Detail

withByteAlignmentback to summary
public PaddingLayout withByteAlignment(long byteAlignment)

Redeclares java.lang.foreign.MemoryLayout.withByteAlignment.

Doc from java.lang.foreign.MemoryLayout.withByteAlignment.

Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).

Exceptions
IllegalArgumentException:
if byteAlignment is not a power of two
withNameback to summary
public PaddingLayout withName(String name)

Redeclares java.lang.foreign.MemoryLayout.withName.

Doc from java.lang.foreign.MemoryLayout.withName.

Returns a memory layout with the same characteristics as this layout, but with the given name.

Annotations
@Override
withoutNameback to summary
public PaddingLayout withoutName()

Redeclares java.lang.foreign.MemoryLayout.withoutName.

Doc from java.lang.foreign.MemoryLayout.withoutName.

Returns a memory layout with the same characteristics as this layout, but with no name.

Annotations
@Override