Uses of Class
java.lang.invoke.VarHandle
| Package | Description |
|---|---|
| java.lang.invoke |
The
java.lang.invoke package provides low-level primitives for interacting
with the Java Virtual Machine. |
| jdk.incubator.foreign |
Classes to support low-level, safe and efficient memory access.
|
-
Uses of VarHandle in java.lang.invoke
Methods in java.lang.invoke that return VarHandle Modifier and Type Method Description static 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 VarHandleConstantBootstraps. fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)Finds aVarHandlefor an instance field.VarHandleMethodHandles.Lookup. findStaticVarHandle(Class<?> decl, String name, Class<?> type)Produces a VarHandle giving access to a static fieldnameof typetypedeclared in a class of typedecl.VarHandleMethodHandles.Lookup. findVarHandle(Class<?> recv, String name, Class<?> type)Produces a VarHandle giving access to a non-static fieldnameof typetypedeclared in a class of typerecv.VarHandleVarHandle.VarHandleDesc. resolveConstantDesc(MethodHandles.Lookup lookup)static VarHandleConstantBootstraps. staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)Finds aVarHandlefor a static field.VarHandleMethodHandles.Lookup. unreflectVarHandle(Field f)Produces a VarHandle giving access to a reflected fieldfof typeTdeclared in a class of typeR.Method parameters in java.lang.invoke with type arguments of type VarHandle Modifier and Type Method Description static 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. -
Uses of VarHandle in jdk.incubator.foreign
Methods in jdk.incubator.foreign that return VarHandle Modifier and Type Method Description static VarHandleMemoryHandles. varHandle(Class<?> carrier, long alignmentBytes, ByteOrder byteOrder)Creates a memory access var handle with the given carrier type, alignment constraint, and byte order.static VarHandleMemoryHandles. varHandle(Class<?> carrier, ByteOrder byteOrder)Creates a memory access var handle with the given carrier type and byte order.default VarHandleMemoryLayout. varHandle(Class<?> carrier, MemoryLayout.PathElement... elements)Creates a memory access var handle that can be used to dereference memory at the layout selected by a given layout path, where the path is considered rooted in this layout.static VarHandleMemoryHandles. withOffset(VarHandle target, long bytesOffset)Creates a memory access var handle with a fixed offset added to the accessed offset.static VarHandleMemoryHandles. withStride(VarHandle target, long bytesStride)Creates a memory access var handle with a variable offset added to the accessed offset.Methods in jdk.incubator.foreign with parameters of type VarHandle Modifier and Type Method Description static VarHandleMemoryHandles. withOffset(VarHandle target, long bytesOffset)Creates a memory access var handle with a fixed offset added to the accessed offset.static VarHandleMemoryHandles. withStride(VarHandle target, long bytesStride)Creates a memory access var handle with a variable offset added to the accessed offset.