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. |
-
Uses of VarHandle in java.lang.invoke
Methods in java.lang.invoke that return VarHandle Modifier and Type Method Description static VarHandle
MethodHandles. arrayElementVarHandle(Class<?> arrayClass)
Produces a VarHandle giving access to elements of an array of typearrayClass
.static VarHandle
ConstantBootstraps. arrayVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> arrayClass)
Finds aVarHandle
for an array type.static VarHandle
MethodHandles. 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 VarHandle
MethodHandles. byteBufferViewVarHandle(Class<?> viewArrayClass, ByteOrder byteOrder)
Produces a VarHandle giving access to elements of aByteBuffer
viewed as if it were an array of elements of a different primitive component type to that ofbyte
, such asint[]
orlong[]
.static VarHandle
ConstantBootstraps. fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)
Finds aVarHandle
for an instance field.VarHandle
MethodHandles.Lookup. findStaticVarHandle(Class<?> decl, String name, Class<?> type)
Produces a VarHandle giving access to a static fieldname
of typetype
declared in a class of typedecl
.VarHandle
MethodHandles.Lookup. findVarHandle(Class<?> recv, String name, Class<?> type)
Produces a VarHandle giving access to a non-static fieldname
of typetype
declared in a class of typerecv
.VarHandle
VarHandle.VarHandleDesc. resolveConstantDesc(MethodHandles.Lookup lookup)
static VarHandle
ConstantBootstraps. staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)
Finds aVarHandle
for a static field.VarHandle
MethodHandles.Lookup. unreflectVarHandle(Field f)
Produces a VarHandle giving access to a reflected fieldf
of typeT
declared in a class of typeR
.Method parameters in java.lang.invoke with type arguments of type VarHandle Modifier and Type Method Description static VarHandle
ConstantBootstraps. arrayVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> arrayClass)
Finds aVarHandle
for an array type.static VarHandle
ConstantBootstraps. fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)
Finds aVarHandle
for an instance field.static VarHandle
ConstantBootstraps. staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)
Finds aVarHandle
for a static field.