Uses of Interface
jdk.incubator.foreign.MemoryLayout
Packages that use MemoryLayout
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of MemoryLayout in jdk.incubator.foreign
Classes in jdk.incubator.foreign that implement MemoryLayoutModifier and TypeClassDescriptionfinal class
A group layout is used to combine multiple member layouts.final class
A sequence layout.class
A value layout.static final class
A value layout whose carrier isMemoryAddress.class
.static final class
A value layout whose carrier isboolean.class
.static final class
A value layout whose carrier isbyte.class
.static final class
A value layout whose carrier ischar.class
.static final class
A value layout whose carrier isdouble.class
.static final class
A value layout whose carrier isfloat.class
.static final class
A value layout whose carrier isint.class
.static final class
A value layout whose carrier islong.class
.static final class
A value layout whose carrier isshort.class
.Methods in jdk.incubator.foreign that return MemoryLayoutModifier and TypeMethodDescriptionSequenceLayout.elementLayout()
Returns the element layout associated with this sequence layout.default MemoryLayout
MemoryLayout.map
(UnaryOperator<MemoryLayout> op, MemoryLayout.PathElement... elements) Creates a transformed copy of this layout where a selected layout, from a path rooted in this layout, is replaced with the result of applying the given operation.static MemoryLayout
MemoryLayout.paddingLayout
(long size) Create a new padding layout with given size.default MemoryLayout
MemoryLayout.select
(MemoryLayout.PathElement... elements) Selects the layout from a path rooted in this layout.MemoryLayout.withBitAlignment
(long bitAlignment) Creates a new layout which features the desired alignment constraint.Creates a new layout which features the desired layout name.Methods in jdk.incubator.foreign that return types with arguments of type MemoryLayoutModifier and TypeMethodDescriptionFunctionDescriptor.argumentLayouts()
Returns the argument layouts associated with this function descriptor.Optional<? extends DynamicConstantDesc<? extends MemoryLayout>>
MemoryLayout.describeConstable()
GroupLayout.memberLayouts()
Returns the member layouts associated with this group.FunctionDescriptor.returnLayout()
Returns the return layout (if any) associated with this function descriptor.Methods in jdk.incubator.foreign with parameters of type MemoryLayoutModifier and TypeMethodDescriptiondefault MemorySegment
SegmentAllocator.allocate
(MemoryLayout layout) Allocate a memory segment with given layout.default MemorySegment
SegmentAllocator.allocateArray
(MemoryLayout elementLayout, long count) Allocate a memory segment with given element layout and size.static MemorySegment
MemorySegment.allocateNative
(MemoryLayout layout, ResourceScope scope) Creates a new native memory segment that models a newly allocated block of off-heap memory with given layout and resource scope.FunctionDescriptor.appendArgumentLayouts
(MemoryLayout... addedLayouts) Create a new function descriptor with the given argument layouts appended to the argument layout array of this function descriptor.FunctionDescriptor.asVariadic
(MemoryLayout... variadicLayouts) Obtain a specialized variadic function descriptor, by appending given variadic layouts to this function descriptor argument layouts.FunctionDescriptor.changeReturnLayout
(MemoryLayout newReturn) Create a new function descriptor with the given memory layout as the new return layout.MemorySegment.elements
(MemoryLayout elementLayout) Returns a sequentialStream
over disjoint slices (whose size matches that of the specified layout) in this segment.FunctionDescriptor.insertArgumentLayouts
(int index, MemoryLayout... addedLayouts) Create a new function descriptor with the given argument layouts inserted at the given index, into the argument layout array of this function descriptor.static FunctionDescriptor
FunctionDescriptor.of
(MemoryLayout resLayout, MemoryLayout... argLayouts) Create a function descriptor with given return and argument layouts.static FunctionDescriptor
FunctionDescriptor.ofVoid
(MemoryLayout... argLayouts) Create a function descriptor with given argument layouts and no return layout.static SequenceLayout
MemoryLayout.sequenceLayout
(long elementCount, MemoryLayout elementLayout) Create a new sequence layout with given element layout and element count.static SequenceLayout
MemoryLayout.sequenceLayout
(MemoryLayout elementLayout) Create a new sequence layout, with unbounded element count and given element layout.void
VaList.skip
(MemoryLayout... layouts) Skips a number of elements with the given memory layouts, and advances this variable argument list's position.MemorySegment.spliterator
(MemoryLayout elementLayout) Returns a spliterator for this memory segment.static GroupLayout
MemoryLayout.structLayout
(MemoryLayout... elements) Create a new struct group layout with given member layouts.static GroupLayout
MemoryLayout.unionLayout
(MemoryLayout... elements) Create a new union group layout with given member layouts.Method parameters in jdk.incubator.foreign with type arguments of type MemoryLayoutModifier and TypeMethodDescriptiondefault MemoryLayout
MemoryLayout.map
(UnaryOperator<MemoryLayout> op, MemoryLayout.PathElement... elements) Creates a transformed copy of this layout where a selected layout, from a path rooted in this layout, is replaced with the result of applying the given operation.