APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.constant

public final Class AsTypeMethodHandleDesc

extends DynamicConstantDesc<MethodHandle>
implements MethodHandleDesc
Class Inheritance
All Implemented Interfaces
java.lang.constant.MethodHandleDesc, java.lang.constant.ConstantDesc
Imports
java.lang.constant.ConstantDescs, .DirectMethodHandleDesc, .DynamicConstantDesc, .MethodHandleDesc, .MethodTypeDesc, java.lang.invoke.MethodHandle, .MethodHandles, .MethodType

A nominal descriptor for a MethodHandle constant that performs a MethodHandle#asType(MethodType) adaptation on another MethodHandle.

Field Summary

Modifier and TypeField and Description
private static final DirectMethodHandleDesc
private final MethodTypeDesc
private final MethodHandleDesc

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public MethodTypeDesc
invocationType()

Implements java.lang.constant.MethodHandleDesc.invocationType.

Returns a MethodTypeDesc describing the invocation type of the method handle described by this nominal descriptor.

public MethodHandle
resolveConstantDesc(MethodHandles.Lookup lookup)

Overrides java.lang.constant.DynamicConstantDesc.resolveConstantDesc.

Implements java.lang.constant.MethodHandleDesc.resolveConstantDesc, java.lang.constant.ConstantDesc.resolveConstantDesc.

Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4.

public String
toString()

Overrides java.lang.constant.DynamicConstantDesc.toString.

Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments.

Inherited from java.lang.constant.DynamicConstantDesc:
bootstrapArgsbootstrapArgsListbootstrapMethodconstantNameconstantTypeequalshashCodeofofofCanonicalofNamed

Field Detail

MHD_METHODHANDLE_ASTYPEback to summary
private static final DirectMethodHandleDesc MHD_METHODHANDLE_ASTYPE
typeback to summary
private final MethodTypeDesc type
underlyingback to summary
private final MethodHandleDesc underlying

Constructor Detail

AsTypeMethodHandleDescback to summary
public AsTypeMethodHandleDesc(MethodHandleDesc underlying, MethodTypeDesc type)

Method Detail

invocationTypeback to summary
public MethodTypeDesc invocationType()

Implements java.lang.constant.MethodHandleDesc.invocationType.

Doc from java.lang.constant.MethodHandleDesc.invocationType.

Returns a MethodTypeDesc describing the invocation type of the method handle described by this nominal descriptor. The invocation type describes the full set of stack values that are consumed by the invocation (including the receiver, if any).

Annotations
@Override
resolveConstantDescback to summary
public MethodHandle resolveConstantDesc(MethodHandles.Lookup lookup) throws ReflectiveOperationException

Overrides java.lang.constant.DynamicConstantDesc.resolveConstantDesc.

Implements java.lang.constant.MethodHandleDesc.resolveConstantDesc, java.lang.constant.ConstantDesc.resolveConstantDesc.

Doc from java.lang.constant.ConstantDesc.resolveConstantDesc.

Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4. The resolution and access control context is provided by the MethodHandles.Lookup parameter. No caching of the resulting value is performed.

Annotations
@Override
Exceptions
ReflectiveOperationException:
if a class, method, or field could not be reflectively resolved in the course of resolution
toStringback to summary
public String toString()

Overrides java.lang.constant.DynamicConstantDesc.toString.

Doc from java.lang.constant.DynamicConstantDesc.toString.

Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments.

Annotations
@Override