Top Description Inners Fields Constructors Methods
jdk.internal.foreign.abi

public Class NativeEntryPoint

extends Object
Class Inheritance
Imports
jdk.internal.ref.CleanerFactory, java.lang.invoke.MethodType, java.lang.ref.Cleaner, java.util.Arrays, .List

This class describes a 'native entry point', which is used as an appendix argument to linkToNative calls.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Modifier and TypeField and Description
private static final Cleaner
private final long
private final MethodType
private static final SoftReferenceCache<NativeEntryPoint.CacheKey, NativeEntryPoint>

Constructor Summary

AccessConstructor and Description
private
NativeEntryPoint(MethodType methodType, long downcallStubAddress)

Method Summary

Modifier and TypeMethod and Description
private static void
checkType(MethodType methodType, boolean needsReturnBuffer, int savedValueMask)

private static void
freeDowncallStub(long downcallStub)

private static native boolean
freeDowncallStub0(long downcallStub)

public static NativeEntryPoint
make(ABIDescriptor abi, VMStorage[] argMoves, VMStorage[] returnMoves, MethodType methodType, boolean needsReturnBuffer, int capturedStateMask, boolean needsTransition)

private static native long
makeDowncallStub(MethodType methodType, ABIDescriptor abi, VMStorage[] encArgMoves, VMStorage[] encRetMoves, boolean needsReturnBuffer, int capturedStateMask, boolean needsTransition)

private static native void
public MethodType
type()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLEANERback to summary
private static final Cleaner CLEANER
downcallStubAddressback to summary
private final long downcallStubAddress
methodTypeback to summary
private final MethodType methodType
NEP_CACHEback to summary
private static final SoftReferenceCache<NativeEntryPoint.CacheKey, NativeEntryPoint> NEP_CACHE

Constructor Detail

NativeEntryPointback to summary
private NativeEntryPoint(MethodType methodType, long downcallStubAddress)

Method Detail

checkTypeback to summary
private static void checkType(MethodType methodType, boolean needsReturnBuffer, int savedValueMask)
freeDowncallStubback to summary
private static void freeDowncallStub(long downcallStub)
freeDowncallStub0back to summary
private static native boolean freeDowncallStub0(long downcallStub)
makeback to summary
public static NativeEntryPoint make(ABIDescriptor abi, VMStorage[] argMoves, VMStorage[] returnMoves, MethodType methodType, boolean needsReturnBuffer, int capturedStateMask, boolean needsTransition)
makeDowncallStubback to summary
private static native long makeDowncallStub(MethodType methodType, ABIDescriptor abi, VMStorage[] encArgMoves, VMStorage[] encRetMoves, boolean needsReturnBuffer, int capturedStateMask, boolean needsTransition)
registerNativesback to summary
private static native void registerNatives()
typeback to summary
public MethodType type()
jdk.internal.foreign.abi back to summary

private final Record NativeEntryPoint.CacheKey

extends Record
Class Inheritance
Record Components
methodType:MethodType
abi:ABIDescriptor
argMoves:List<VMStorage> 
retMoves:List<VMStorage> 
needsReturnBuffer:boolean 
capturedStateMask:int 
needsTransition:boolean 

Field Summary

Modifier and TypeField and Description
private final ABIDescriptor
abi

Record Component accessed by abi().

private final List<VMStorage>
argMoves

Record Component accessed by argMoves().

private final int
capturedStateMask

Record Component accessed by capturedStateMask().

private final MethodType
methodType

Record Component accessed by methodType().

private final boolean
needsReturnBuffer

Record Component accessed by needsReturnBuffer().

private final boolean
needsTransition

Record Component accessed by needsTransition().

private final List<VMStorage>
retMoves

Record Component accessed by retMoves().

Constructor Summary

AccessConstructor and Description
private
CacheKey(MethodType methodType, ABIDescriptor abi, List<VMStorage> argMoves, List<VMStorage> retMoves, boolean needsReturnBuffer, int capturedStateMask, boolean needsTransition)

Method Summary

Modifier and TypeMethod and Description
public ABIDescriptor
abi()

Record Component getter of abi.

public List<VMStorage>
argMoves()

Record Component getter of argMoves.

public int
capturedStateMask()

Record Component getter of capturedStateMask.

public final boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.
public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.
public MethodType
methodType()

Record Component getter of methodType.

public boolean
needsReturnBuffer()

Record Component getter of needsReturnBuffer.

public boolean
needsTransition()

Record Component getter of needsTransition.

public List<VMStorage>
retMoves()

Record Component getter of retMoves.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

abiback to summary
private final ABIDescriptor abi

Record Component accessed by abi().

argMovesback to summary
private final List<VMStorage> argMoves

Record Component accessed by argMoves().

capturedStateMaskback to summary
private final int capturedStateMask

Record Component accessed by capturedStateMask().

methodTypeback to summary
private final MethodType methodType

Record Component accessed by methodType().

needsReturnBufferback to summary
private final boolean needsReturnBuffer

Record Component accessed by needsReturnBuffer().

needsTransitionback to summary
private final boolean needsTransition

Record Component accessed by needsTransition().

retMovesback to summary
private final List<VMStorage> retMoves

Record Component accessed by retMoves().

Constructor Detail

CacheKeyback to summary
private CacheKey(MethodType methodType, ABIDescriptor abi, List<VMStorage> argMoves, List<VMStorage> retMoves, boolean needsReturnBuffer, int capturedStateMask, boolean needsTransition)

Method Detail

abiback to summary
public ABIDescriptor abi()

Record Component getter of abi.

argMovesback to summary
public List<VMStorage> argMoves()

Record Component getter of argMoves.

capturedStateMaskback to summary
public int capturedStateMask()

Record Component getter of capturedStateMask.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

Returns:int

a hash code value for this record.

methodTypeback to summary
public MethodType methodType()

Record Component getter of methodType.

needsReturnBufferback to summary
public boolean needsReturnBuffer()

Record Component getter of needsReturnBuffer.

needsTransitionback to summary
public boolean needsTransition()

Record Component getter of needsTransition.

retMovesback to summary
public List<VMStorage> retMoves()

Record Component getter of retMoves.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

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.

Returns:String

a string representation of the object.