public interface MethodHandleAccessProvider
MethodHandle
implementation of the VM. An
implementation of this interface is usually required to access non-public classes, methods, and
fields of MethodHandle
, i.e., data that is not standardized by the Java specification.Modifier and Type | Interface and Description |
---|---|
static class |
MethodHandleAccessProvider.IntrinsicMethod
Identification for methods defined on the class
MethodHandle that are processed by
the MethodHandleAccessProvider . |
Modifier and Type | Method and Description |
---|---|
MethodHandleAccessProvider.IntrinsicMethod |
lookupMethodHandleIntrinsic(ResolvedJavaMethod method)
Returns the method handle method intrinsic identifier for the provided method, or
null if the method is not an intrinsic processed by this interface. |
ResolvedJavaMethod |
resolveInvokeBasicTarget(JavaConstant methodHandle,
boolean forceBytecodeGeneration)
Resolves the invocation target for an invocation of
MethodHandle.invokeBasic with the given constant receiver MethodHandle . |
ResolvedJavaMethod |
resolveLinkToTarget(JavaConstant memberName)
Resolves the invocation target for an invocation of a
MethodHandle.linkTo* method
with the given constant member name. |
MethodHandleAccessProvider.IntrinsicMethod lookupMethodHandleIntrinsic(ResolvedJavaMethod method)
null
if the method is not an intrinsic processed by this interface.ResolvedJavaMethod resolveInvokeBasicTarget(JavaConstant methodHandle, boolean forceBytecodeGeneration)
MethodHandle.invokeBasic
with the given constant receiver MethodHandle
. Returns
null
if the invocation target is not available at this time.
The first invocations of a method handle can use an interpreter to lookup the actual invoked method; frequently executed method handles can use Java bytecode generation to avoid the interpreter overhead. If the parameter forceBytecodeGeneration is set to true, the VM should try to generate bytecodes before this method returns.
ResolvedJavaMethod resolveLinkToTarget(JavaConstant memberName)
MethodHandle.linkTo*
method
with the given constant member name. The member name is the last parameter of the
linkTo*
method. Returns null
if the invocation target is not available at
this time.