Uses of Class
java.lang.invoke.VarHandle
Packages that use VarHandle
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
The
java.lang.invoke package provides low-level primitives for interacting
with the Java Virtual Machine.-
Uses of VarHandle in java.lang.foreign
Methods in java.lang.foreign that return VarHandleModifier and TypeMethodDescriptionMemoryLayout.arrayElementVarHandle(MemoryLayout.PathElement... elements) Creates a var handle that accesses adjacent elements in a memory segment at offsets selected by the given layout path, where the accessed elements have this layout, and where the initial layout in the path is this layout.MemoryLayout.varHandle(MemoryLayout.PathElement... elements) Creates a var handle that accesses a memory segment at the offset selected by the given layout path, where the initial layout in the path is this layout.ValueLayout.varHandle()Returns a var handle which can be used to access values described by this value layout, in a given memory segment. -
Uses of VarHandle in java.lang.invoke
Subclasses with type arguments of type VarHandle in java.lang.invokeModifier and TypeClassDescriptionstatic final classA nominal descriptor for aVarHandleconstant.Methods in java.lang.invoke that return VarHandleModifier and TypeMethodDescriptionstatic VarHandleMethodHandles.arrayElementVarHandle(Class<?> arrayClass) Produces a VarHandle giving access to elements of an array of typearrayClass.static VarHandleConstantBootstraps.arrayVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> arrayClass) Finds aVarHandlefor an array type.static VarHandleMethodHandles.byteArrayViewVarHandle(Class<?> viewArrayClass, ByteOrder byteOrder) Produces a VarHandle giving access to elements of abyte[]array viewed as if it were a different primitive array type, such asint[]orlong[].static VarHandleMethodHandles.byteBufferViewVarHandle(Class<?> viewArrayClass, ByteOrder byteOrder) Produces a VarHandle giving access to elements of aByteBufferviewed as if it were an array of elements of a different primitive component type to that ofbyte, such asint[]orlong[].static VarHandleMethodHandles.collectCoordinates(VarHandle target, int pos, MethodHandle filter) Adapts a target var handle by pre-processing a sub-sequence of its coordinate values with a filter (a method handle).static VarHandleMethodHandles.dropCoordinates(VarHandle target, int pos, Class<?>... valueTypes) Returns a var handle which will discard some dummy coordinates before delegating to the target var handle.static VarHandleConstantBootstraps.fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Finds aVarHandlefor an instance field.static VarHandleMethodHandles.filterCoordinates(VarHandle target, int pos, MethodHandle... filters) Adapts a target var handle by pre-processing incoming coordinate values using unary filter functions.static VarHandleMethodHandles.filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget) Adapts a target var handle by pre-processing incoming and outgoing values using a pair of filter functions.MethodHandles.Lookup.findStaticVarHandle(Class<?> decl, String name, Class<?> type) Produces a VarHandle giving access to a static fieldnameof typetypedeclared in a class of typedecl.MethodHandles.Lookup.findVarHandle(Class<?> recv, String name, Class<?> type) Produces a VarHandle giving access to a non-static fieldnameof typetypedeclared in a class of typerecv.static VarHandleMethodHandles.insertCoordinates(VarHandle target, int pos, Object... values) Provides a target var handle with one or more bound coordinates in advance of the var handle's invocation.static VarHandleMethodHandles.permuteCoordinates(VarHandle target, List<Class<?>> newCoordinates, int... reorder) Provides a var handle which adapts the coordinate values of the target var handle, by re-arranging them so that the new coordinates match the provided ones.static VarHandleConstantBootstraps.staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Finds aVarHandlefor a static field.MethodHandles.Lookup.unreflectVarHandle(Field f) Produces a VarHandle giving access to a reflected fieldfof typeTdeclared in a class of typeR.abstract VarHandleVarHandle.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.abstract VarHandleVarHandle.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.Methods in java.lang.invoke with parameters of type VarHandleModifier and TypeMethodDescriptionstatic VarHandleMethodHandles.collectCoordinates(VarHandle target, int pos, MethodHandle filter) Adapts a target var handle by pre-processing a sub-sequence of its coordinate values with a filter (a method handle).static VarHandleMethodHandles.dropCoordinates(VarHandle target, int pos, Class<?>... valueTypes) Returns a var handle which will discard some dummy coordinates before delegating to the target var handle.static VarHandleMethodHandles.filterCoordinates(VarHandle target, int pos, MethodHandle... filters) Adapts a target var handle by pre-processing incoming coordinate values using unary filter functions.static VarHandleMethodHandles.filterValue(VarHandle target, MethodHandle filterToTarget, MethodHandle filterFromTarget) Adapts a target var handle by pre-processing incoming and outgoing values using a pair of filter functions.static VarHandleMethodHandles.insertCoordinates(VarHandle target, int pos, Object... values) Provides a target var handle with one or more bound coordinates in advance of the var handle's invocation.static VarHandleMethodHandles.permuteCoordinates(VarHandle target, List<Class<?>> newCoordinates, int... reorder) Provides a var handle which adapts the coordinate values of the target var handle, by re-arranging them so that the new coordinates match the provided ones.Method parameters in java.lang.invoke with type arguments of type VarHandleModifier and TypeMethodDescriptionstatic VarHandleConstantBootstraps.arrayVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> arrayClass) Finds aVarHandlefor an array type.static VarHandleConstantBootstraps.fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Finds aVarHandlefor an instance field.static VarHandleConstantBootstraps.staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Finds aVarHandlefor a static field.