public interface jdk.incubator.foreign.MemorySegment extends jdk.incubator.foreign.Addressable, java.lang.AutoCloseable
minor version: 0
major version: 59
flags: flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT
this_class: jdk.incubator.foreign.MemorySegment
super_class: java.lang.Object
{
public static final int READ;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 1
public static final int WRITE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 2
public static final int CLOSE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 4
public static final int SHARE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 8
public static final int HANDOFF;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 16
public static final int ALL_ACCESS;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 31
public abstract jdk.incubator.foreign.MemoryAddress address();
descriptor: ()Ljdk/incubator/foreign/MemoryAddress;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract java.util.Spliterator<jdk.incubator.foreign.MemorySegment> spliterator(jdk.incubator.foreign.SequenceLayout);
descriptor: (Ljdk/incubator/foreign/SequenceLayout;)Ljava/util/Spliterator;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: (Ljdk/incubator/foreign/SequenceLayout;)Ljava/util/Spliterator<Ljdk/incubator/foreign/MemorySegment;>;
MethodParameters:
Name Flags
layout
public abstract java.lang.Thread ownerThread();
descriptor: ()Ljava/lang/Thread;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract long byteSize();
descriptor: ()J
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment withAccessModes(int);
descriptor: (I)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
accessModes
public abstract boolean hasAccessModes(int);
descriptor: (I)Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
accessModes
public abstract int accessModes();
descriptor: ()I
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment asSlice(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
offset
newSize
public jdk.incubator.foreign.MemorySegment asSlice(jdk.incubator.foreign.MemoryAddress, long);
descriptor: (Ljdk/incubator/foreign/MemoryAddress;J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
aload 1
aload 0
invokeinterface jdk.incubator.foreign.MemoryAddress.segmentOffset:(Ljdk/incubator/foreign/MemorySegment;)J
lload 2
invokeinterface jdk.incubator.foreign.MemorySegment.asSlice:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/foreign/MemorySegment;
0 2 1 newBase Ljdk/incubator/foreign/MemoryAddress;
0 2 2 newSize J
MethodParameters:
Name Flags
newBase
newSize
public jdk.incubator.foreign.MemorySegment asSlice(long);
descriptor: (J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
lload 1
aload 0
invokeinterface jdk.incubator.foreign.MemorySegment.byteSize:()J
lload 1
lsub
invokeinterface jdk.incubator.foreign.MemorySegment.asSlice:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/MemorySegment;
0 1 1 offset J
MethodParameters:
Name Flags
offset
public jdk.incubator.foreign.MemorySegment asSlice(jdk.incubator.foreign.MemoryAddress);
descriptor: (Ljdk/incubator/foreign/MemoryAddress;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
aload 1
aload 0
invokeinterface jdk.incubator.foreign.MemoryAddress.segmentOffset:(Ljdk/incubator/foreign/MemorySegment;)J
invokeinterface jdk.incubator.foreign.MemorySegment.asSlice:(J)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/foreign/MemorySegment;
0 2 1 newBase Ljdk/incubator/foreign/MemoryAddress;
MethodParameters:
Name Flags
newBase
public abstract boolean isMapped();
descriptor: ()Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract boolean isAlive();
descriptor: ()Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract void close();
descriptor: ()V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment handoff(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
thread
public abstract jdk.incubator.foreign.MemorySegment handoff(jdk.incubator.foreign.NativeScope);
descriptor: (Ljdk/incubator/foreign/NativeScope;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
nativeScope
public abstract jdk.incubator.foreign.MemorySegment share();
descriptor: ()Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract jdk.incubator.foreign.MemorySegment registerCleaner(java.lang.ref.Cleaner);
descriptor: (Ljava/lang/ref/Cleaner;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
cleaner
public abstract jdk.incubator.foreign.MemorySegment fill(byte);
descriptor: (B)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
value
public abstract void copyFrom(jdk.incubator.foreign.MemorySegment);
descriptor: (Ljdk/incubator/foreign/MemorySegment;)V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
src
public abstract long mismatch(jdk.incubator.foreign.MemorySegment);
descriptor: (Ljdk/incubator/foreign/MemorySegment;)J
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
other
public abstract java.nio.ByteBuffer asByteBuffer();
descriptor: ()Ljava/nio/ByteBuffer;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract byte[] toByteArray();
descriptor: ()[B
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract short[] toShortArray();
descriptor: ()[S
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract char[] toCharArray();
descriptor: ()[C
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract int[] toIntArray();
descriptor: ()[I
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract float[] toFloatArray();
descriptor: ()[F
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract long[] toLongArray();
descriptor: ()[J
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract double[] toDoubleArray();
descriptor: ()[D
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public static jdk.incubator.foreign.MemorySegment ofByteBuffer(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.AbstractMemorySegmentImpl.ofBuffer:(Ljava/nio/ByteBuffer;)Ljdk/internal/foreign/AbstractMemorySegmentImpl;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bb Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
bb
public static jdk.incubator.foreign.MemorySegment ofArray(byte[]);
descriptor: ([B)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfByte.fromArray:([B)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [B
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(char[]);
descriptor: ([C)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfChar.fromArray:([C)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [C
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(short[]);
descriptor: ([S)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfShort.fromArray:([S)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [S
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(int[]);
descriptor: ([I)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfInt.fromArray:([I)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [I
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(float[]);
descriptor: ([F)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfFloat.fromArray:([F)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [F
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(long[]);
descriptor: ([J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfLong.fromArray:([J)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [J
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment ofArray(double[]);
descriptor: ([D)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic jdk.internal.foreign.HeapMemorySegmentImpl$OfDouble.fromArray:([D)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arr [D
MethodParameters:
Name Flags
arr
public static jdk.incubator.foreign.MemorySegment allocateNative(jdk.incubator.foreign.MemoryLayout);
descriptor: (Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
invokeinterface jdk.incubator.foreign.MemoryLayout.byteSize:()J
aload 0
invokeinterface jdk.incubator.foreign.MemoryLayout.byteAlignment:()J
invokestatic jdk.incubator.foreign.MemorySegment.allocateNative:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 layout Ljdk/incubator/foreign/MemoryLayout;
MethodParameters:
Name Flags
layout
public static jdk.incubator.foreign.MemorySegment allocateNative(long);
descriptor: (J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: lload 0
lconst_1
invokestatic jdk.incubator.foreign.MemorySegment.allocateNative:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bytesSize J
MethodParameters:
Name Flags
bytesSize
public static jdk.incubator.foreign.MemorySegment mapFile(java.nio.file.Path, long, long, java.nio.channels.FileChannel$MapMode);
descriptor: (Ljava/nio/file/Path;JJLjava/nio/channels/FileChannel$MapMode;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=6, args_size=4
start local 0 start local 1 start local 3 start local 5 0: aload 0
lload 1
lload 3
aload 5
invokestatic jdk.internal.foreign.MappedMemorySegmentImpl.makeMappedSegment:(Ljava/nio/file/Path;JJLjava/nio/channels/FileChannel$MapMode;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 path Ljava/nio/file/Path;
0 1 1 bytesOffset J
0 1 3 bytesSize J
0 1 5 mapMode Ljava/nio/channels/FileChannel$MapMode;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
path
bytesOffset
bytesSize
mapMode
public static jdk.incubator.foreign.MemorySegment allocateNative(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=4, args_size=2
start local 0 start local 2 0: lload 0
lconst_0
lcmp
ifgt 2
1: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Invalid allocation size : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 0
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
lload 2
lconst_0
lcmp
iflt 4
3: lload 2
lload 2
lconst_1
lsub
land
lconst_0
lcmp
ifeq 5
4: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Invalid alignment constraint : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 2
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
lload 0
lload 2
invokestatic jdk.internal.foreign.NativeMemorySegmentImpl.makeNativeSegment:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 bytesSize J
0 6 2 alignmentBytes J
MethodParameters:
Name Flags
bytesSize
alignmentBytes
public static jdk.incubator.foreign.MemorySegment ofNativeRestricted();
descriptor: ()Ljdk/incubator/foreign/MemorySegment;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "MemorySegment.ofNativeRestricted"
invokestatic jdk.internal.foreign.Utils.checkRestrictedAccess:(Ljava/lang/String;)V
1: getstatic jdk.internal.foreign.NativeMemorySegmentImpl.EVERYTHING:Ljdk/incubator/foreign/MemorySegment;
areturn
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "MemorySegment.java"
InnerClasses:
public MapMode = java.nio.channels.FileChannel$MapMode of java.nio.channels.FileChannel
public OfByte = jdk.internal.foreign.HeapMemorySegmentImpl$OfByte of jdk.internal.foreign.HeapMemorySegmentImpl
public OfChar = jdk.internal.foreign.HeapMemorySegmentImpl$OfChar of jdk.internal.foreign.HeapMemorySegmentImpl
public OfDouble = jdk.internal.foreign.HeapMemorySegmentImpl$OfDouble of jdk.internal.foreign.HeapMemorySegmentImpl
public OfFloat = jdk.internal.foreign.HeapMemorySegmentImpl$OfFloat of jdk.internal.foreign.HeapMemorySegmentImpl
public OfInt = jdk.internal.foreign.HeapMemorySegmentImpl$OfInt of jdk.internal.foreign.HeapMemorySegmentImpl
public OfLong = jdk.internal.foreign.HeapMemorySegmentImpl$OfLong of jdk.internal.foreign.HeapMemorySegmentImpl
public OfShort = jdk.internal.foreign.HeapMemorySegmentImpl$OfShort of jdk.internal.foreign.HeapMemorySegmentImpl