Top Description Inners Fields Constructors Methods
java.lang.invoke

pack-priv sealed Class DirectMethodHandle

extends MethodHandle
permits Special, Interface, Constructor, Accessor, StaticAccessor
Class Inheritance
Known Direct Subclasses
java.lang.invoke.DirectMethodHandle.Special, java.lang.invoke.DirectMethodHandle.Interface, java.lang.invoke.DirectMethodHandle.Constructor, java.lang.invoke.DirectMethodHandle.Accessor, java.lang.invoke.DirectMethodHandle.StaticAccessor
Imports
jdk.internal.misc.Unsafe, jdk.internal.vm.annotation.ForceInline, .Stable, sun.invoke.util.ValueConversions, .VerifyAccess, .Wrapper, java.util.Arrays, .Objects, java.util.function.Function

The flavor of method handle which implements a constant reference to a class member.
Author
jrose

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
DirectMethodHandle.Accessor

This subclass handles non-static field references.

pack-priv static class
DirectMethodHandle.Constructor

This subclass handles constructor references.

pack-priv class
pack-priv static class
DirectMethodHandle.Interface

This subclass represents invokeinterface instructions.

pack-priv static class
DirectMethodHandle.Special

This subclass represents invokespecial instructions.

pack-priv static class
DirectMethodHandle.StaticAccessor

This subclass handles static field references.

Field Summary

Modifier and TypeField and Description
private static final LambdaForm[]
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
private static final Wrapper[]
pack-priv final boolean
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
private static final MemberName.Factory
private static final MethodType
pack-priv final MemberName
pack-priv static final byte
NF_allocateInstance

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_checkBase

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_checkCast

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_checkReceiver

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_constructorMethod

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_ensureInitialized

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_fieldOffset

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_internalMemberName

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_internalMemberNameEnsureInit

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_LIMIT

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_staticBase

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_staticOffset

Pre-initialized NamedFunctions for bootstrapping purposes.

pack-priv static final byte
NF_UNSAFE

Pre-initialized NamedFunctions for bootstrapping purposes.

private static final LambdaForm.NamedFunction[]
private static final MethodType
Inherited from java.lang.invoke.MethodHandle:
form

Constructor Summary

AccessConstructor and Description
private
DirectMethodHandle(MethodType mtype, LambdaForm form, MemberName member, boolean crackable)

Method Summary

Modifier and TypeMethod and Description
private static int
afIndex(byte formOp, boolean isVolatile, int ftypeKind)

pack-priv static Object
pack-priv static Object
pack-priv static Object
pack-priv Object
private static boolean
pack-priv Object
checkReceiver(Object recv)

Used for interface receiver type checks, by Interface and Special modes.

pack-priv static Object
pack-priv MethodHandle
private static LambdaForm.NamedFunction
createFunction(byte func)

private void
pack-priv static void
pack-priv static long
fieldOffset(Object accessorObj)

pack-priv static Object
pack-priv static int
ftypeKind(Class<?> ftype)

private static LambdaForm.Kind
getFieldKind(boolean isGetter, boolean isVolatile, Wrapper wrapper)

private static LambdaForm.NamedFunction
getFunction(byte func)

private static LambdaForm.NamedFunction
pack-priv MemberName
pack-priv static Object
internalMemberName(Object mh)

Static wrapper for DirectMethodHandle.internalMemberName.

pack-priv static Object
internalMemberNameEnsureInit(Object mh)

Static wrapper for DirectMethodHandle.internalMemberName.

pack-priv String
pack-priv boolean
pack-priv static DirectMethodHandle
make(byte refKind, Class<?> refc, MemberName member, Class<?> callerClass)

pack-priv static DirectMethodHandle
make(Class<?> refc, MemberName member)

pack-priv static DirectMethodHandle
make(MemberName member)

pack-priv static DirectMethodHandle
makeAllocator(Class<?> instanceClass, MemberName ctor)

pack-priv static LambdaForm
makePreparedFieldLambdaForm(byte formOp, boolean isVolatile, int ftypeKind)

pack-priv static LambdaForm
private static void
pack-priv static Object
private static LambdaForm
preparedFieldLambdaForm(MemberName m)

Create a LF which can access the given field.

private static LambdaForm
preparedFieldLambdaForm(byte formOp, boolean isVolatile, Class<?> ftype)

private static LambdaForm
preparedLambdaForm(MemberName m, boolean adaptToSpecialIfc)

Create a LF which can invoke the given method.

private static LambdaForm
private static LambdaForm
preparedLambdaForm(MethodType mtype, int which)

pack-priv BoundMethodHandle
rebind()

Implements abstract java.lang.invoke.MethodHandle.rebind.

Require this method handle to be a BMH, or else replace it with a "wrapper" BMH.

pack-priv static boolean
pack-priv static Object
staticBase(Object accessorObj)

pack-priv static long
staticOffset(Object accessorObj)

pack-priv MethodHandle
Inherited from java.lang.invoke.MethodHandle:
asCollectorasCollectorasCollectorChecksasFixedArityasSpreaderasSpreaderasTypeasTypeUncachedasVarargsCollectorbindArgumentLbindTocustomizedebugPrefixdebugStringdebugStringdescribeConstableinternalCallerClassinternalForminternalPropertiesinternalValuesintrinsicDataintrinsicNameinvokeinvokeBasicinvokeExactinvokeWithArgumentsinvokeWithArgumentsisInvokeSpecialisVarargsCollectorlinkToInterfacelinkToNativelinkToSpeciallinkToStaticlinkToVirtualmaybeCustomizesetVarargsstandardStringtoStringtypeupdateFormviewAsTypeCheckswithInternalMemberNamewithVarargs