APIdia Launch Partner
Top Description Fields Constructors Methods
java.lang.invoke

pack-priv final Class SegmentVarHandle

extends VarHandle
Class Inheritance
Imports
java.lang.foreign.MemoryLayout, .MemorySegment, java.util.Objects, jdk.internal.foreign.AbstractMemorySegmentImpl, jdk.internal.misc.ScopedMemoryAccess, jdk.internal.vm.annotation.ForceInline

A var handle that accesses primitive values in a memory segment.

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
pack-priv final boolean
be

endianness

pack-priv final MemoryLayout
enclosing

The layout the accessed segment must be compatible with.

pack-priv final long
offset

The offset value, if is constant.

pack-priv static final ScopedMemoryAccess
Inherited from java.lang.invoke.VarHandle:
exactmethodHandleTablemethodTypeTablevform

Constructor Summary

AccessConstructor and Description
pack-priv
SegmentVarHandle(VarForm form, boolean be, MemoryLayout enclosing, long offset, boolean exact)

Method Summary

Modifier and TypeMethod and Description
pack-priv final MethodType
pack-priv AbstractMemorySegmentImpl
checkSegment(Object obb, long base, boolean ro)

pack-priv static long
offset(AbstractMemorySegmentImpl bb, long base, long offset)

public SegmentVarHandle
withInvokeBehavior()

Implements abstract java.lang.invoke.VarHandle.withInvokeBehavior.

Returns a VarHandle, with access to the same variable(s) as this VarHandle, but whose invocation behavior of access mode methods is adjusted to invoke behavior.

public SegmentVarHandle
withInvokeExactBehavior()

Implements abstract java.lang.invoke.VarHandle.withInvokeExactBehavior.

Returns a VarHandle, with access to the same variable(s) as this VarHandle, but whose invocation behavior of access mode methods is adjusted to invoke-exact behavior.

Inherited from java.lang.invoke.VarHandle:
accessModeTypeaccessModeTypeaccessModeTypeUncachedacquireFenceasDirectcheckAccessModeThenIsDirectcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetcoordinateTypesdescribeConstablefullFencegetgetAcquiregetAndAddgetAndAddAcquiregetAndAddReleasegetAndBitwiseAndgetAndBitwiseAndAcquiregetAndBitwiseAndReleasegetAndBitwiseOrgetAndBitwiseOrAcquiregetAndBitwiseOrReleasegetAndBitwiseXorgetAndBitwiseXorAcquiregetAndBitwiseXorReleasegetAndSetgetAndSetAcquiregetAndSetReleasegetMethodHandlegetMethodHandleUncachedgetOpaquegetVolatilehasInvokeExactBehaviorisAccessModeSupportedloadLoadFencereleaseFencesetsetOpaquesetReleasesetVolatilestoreStoreFencetargettoMethodHandletoStringupdateVarFormvarTypeweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetRelease

Field Detail

BEback to summary
pack-priv static final boolean BE
beback to summary
pack-priv final boolean be

endianness

enclosingback to summary
pack-priv final MemoryLayout enclosing

The layout the accessed segment must be compatible with.

offsetback to summary
pack-priv final long offset

The offset value, if is constant. vform decides if offset is constant or variable.

SCOPED_MEMORY_ACCESSback to summary
pack-priv static final ScopedMemoryAccess SCOPED_MEMORY_ACCESS

Constructor Detail

SegmentVarHandleback to summary
pack-priv SegmentVarHandle(VarForm form, boolean be, MemoryLayout enclosing, long offset, boolean exact)

Method Detail

accessModeTypeUncachedback to summary
pack-priv final MethodType accessModeTypeUncached(VarHandle.AccessType accessType)

Implements abstract java.lang.invoke.VarHandle.accessModeTypeUncached.

Annotations
@Override
checkSegmentback to summary
pack-priv AbstractMemorySegmentImpl checkSegment(Object obb, long base, boolean ro)
Annotations
@ForceInline
offsetback to summary
pack-priv static long offset(AbstractMemorySegmentImpl bb, long base, long offset)
Annotations
@ForceInline
withInvokeBehaviorback to summary
public SegmentVarHandle withInvokeBehavior()

Implements abstract java.lang.invoke.VarHandle.withInvokeBehavior.

Doc from java.lang.invoke.VarHandle.withInvokeBehavior.

Returns a VarHandle, with access to the same variable(s) as this VarHandle, but whose invocation behavior of access mode methods is adjusted to invoke behavior.

If this VarHandle already has invoke behavior this VarHandle is returned.

Invoking hasInvokeExactBehavior() on the returned var handle is guaranteed to return false.

Annotations
@Override
withInvokeExactBehaviorback to summary
public SegmentVarHandle withInvokeExactBehavior()

Implements abstract java.lang.invoke.VarHandle.withInvokeExactBehavior.

Doc from java.lang.invoke.VarHandle.withInvokeExactBehavior.

Returns a VarHandle, with access to the same variable(s) as this VarHandle, but whose invocation behavior of access mode methods is adjusted to invoke-exact behavior.

If this VarHandle already has invoke-exact behavior this VarHandle is returned.

Invoking hasInvokeExactBehavior() on the returned var handle is guaranteed to return true.

Annotations
@Override